By integrating Klaviyo with Trengo, you can automate processes in Trengo, based on triggers in Klaviyo. In this series of articles, we’ll show you how to automatically send a WhatsApp Ttemplate to your customers, with the use of Klaviyo.

After creating your flow, choosing your trigger, and adding the ‘Webhook’ action to it, it’s time to configure your webhook.

Configure your webhook in Klaviyo

Follow the steps below to configure the webhook you’ve set up in Klaviyo.

1. Fill in the destination URL for your webhook;

ℹ️ This URL can be found on the Trengo for Developers page, below the title of the API call you want to trigger.

2. Fill in the word ‘Authorization’ for ‘Key’. Type ‘Bearer’ for ‘Value’ and paste your Trengo API key;

ℹ️ This API key can be (re)generated by going to Trengo > Settings > Apps & integrations > Rest API > Regenerate API token. Do note that regenerating your API token will invalidate the current token.

3. Navigate back to the API Call you’d like to trigger on the Trengo for Developers page. Configure the JSON body of this API call. In this example, we’ll set up ‘Send a WhatsApp template’;

1. Recipient_phone_number: Add Klaviyo’s tag ‘{{ person.phone_number }}’ here.

2. HSM_ID: Paste the ID of the WhatsApp Template you’d like to use here. This ID can be found by navigating to ‘Manage templates’ in Trengo, selecting the template, and copying the numbers at the end of the URL.

3. Params: If your WhatsApp template contains variables, you can specify them here. Add the correct number for ‘Key’, and add a value. You can use Klaviyo’s tags (e.g. ‘{{ first_name }}’) here.

ℹ️ If you’d like to add (more) variables, click ‘Add object’.

4. Copy the body, from the green opening curly bracket to the green closing curly bracket, from the request example;

5. Back in Klaviyo, paste the JSON body of your API call;

ℹ️ In case you make use of variables, make sure to delete the quotation marks around the ‘Key’ values.

6. Optionally preview your webhook by clicking the ‘Preview webhook’;

7. Save your webhook by clicking ‘Save’;

Now you’ve configured your webhook, it’s time to publish your flow in Klaviyo.

👈 Creating a flow in Klaviyo

Publishing your flow in Klaviyo 👉