Create a Contact in WATI when a new contact is created in Klaviyo

Jahnavi Prasad Updated by Jahnavi Prasad

Contacts are created automatically in Klaviyo when someone fills up a published Klaviyo form or subscribes to a list. We can choose to add these contacts automatically in WATI.

For example: You have a Contact Us form powered by a Klaviyo on your website and every time someone fills it, you can add them as a contact in WATI.

While we do not have a direct plugin to implement this use case, it can be achieved using Klaviyo's new tool called napkin.io. The first 5,000 executions of this Napkin function are free every month.

Process:

User fills a Klaviyo form -> Contact is created in Klaviyo -> A Klaviyo flow with trigger 'When a profile subscribes to this form' is triggered -> The contact details are pushed to napkin.io -> napkin.io creates the contact in WATI.

How To:

  1. Go to Klaviyo Flows and create a new flow from scratch
  2. Choose the Trigger as Added to List and select the list that's associated with the form. Cick save.
    When users fill this form, their contact is added to this list and then created as contact in WATI.
  3. Now clone the Napkin at https://www.napkin.io/n/a8f27227df1f4602
  4. In a new tab, login to your Wati account, go to API Docs section, copy the API Endpoint and paste it in line 16
  5. Copy the Access Token from the same WATI page, go to Other section in Napkin and add it under Environment Variables as shown below. In the key-value pair, the key is Authorization, and the value is the Token copied.
  6. Click Deploy and copy the URL that shows up beside the blue Share button at the top.
  7. Navigate back to the Klaviyo Flow, Drag and Drop the Webhook below the trigger.
  8. Name the webhook, add the copied url from Napkin in the Destination URL field. Add the following snippet to the JSON Body section:
    {
    "name": "{{ person.first_name|default:'' }}",
    "phone": "{{ person.phone_number|default:'' }}"
    }
  9. Save the webhook, set it as Live and click on Update Action Statuses on the top right.

The flow is live. Whenever someone fills the form, this Klaviyo sends their details to Naplkin which in turn creates a contact in WATI.

How did we do?

Klaviyo Integration

Contact