Trigger postcards from an Iterable Journey Webhook

Learn how to use Iterable to trigger a PostPilot mailing using a journey webhook.

Step 1: Grab your API key (<2 minutes)

Simply follow our step-by-step guide on how to create a new API connection for your integration and return to this page when done to continue with step 2.

Step 2: Create a PostPilot Flow (<5 minutes)

When you trigger a webhook from a Klaviyo flow, you need to tell PostPilot what to do. Follow our step-by-step guide on how to create a PostPilot flow targeting an API connection, and return to this page when done to continue with Step 3.

Step 3: Add a new Journey Webhook in Iterable (<3 minutes)

Create a new webhook in Iterable via the steps outlined in the Iterable help documentation here: https://support.iterable.com/hc/en-us/articles/205480275-Journey-Webhooks#creating-journey-webhooks.

Creating a journey webhook

Configure your new webhook

Give your webhook a name (like "PostPilot Flow Trigger"), and set the Method value to "POST", and paste your API URL for the PostPilot flow you want to trigger (from step 4 when you previously created the flow) into the endpoint field.

You can leave the authentication and custom headers fields empty.

Configure the Body of your webhook

Ensure that the body field of the webhook is set to "JSON".

Then, add the following to ensure that information about your recipients is correctly sent to PostPilot for mailing:


{
"reference_id": "{{ email }}",
"firstname": "{{ firstName }}",
"lastname": "{{ lastName }}",
"email": "{{ email }}",
"line1": "{{ addressLine1 }}",
"line2": "{{ addressLine1 }}",
"city": "{{ addressCity }}",
"state": "{{ addressState }}",
"postal_code": "{{ addressZip }}",
 "country": "{{ addressCountry }}"
}

Note that you may need to change the boldfaced elements in the above based on the values you use in your Iterable project!

For example, if you use a different value like "street_address_1", you should substitute that in place of "addressLine1" above.

Remember that when initially creating and testing your new webhook, you can utilize the API Logs screen available in the API connection area of the PostPilot app to quickly troubleshoot activity!

Note the following additional details:

  • State is expected to be a standard USPS two-character state abbreviation
  • Country is expected to be a standard ISO 3166 two-character country code.  (I.e., "US" for the USA.)  If needed, you can always fix the country code in your webhook body by specifying it as follows: 
    "country": "US"

Utilizing your journey webhook in Iterable

You can follow the remainder of the Iterable help documentation to use your webhook in a journey here: https://support.iterable.com/hc/en-us/articles/205480275-Journey-Webhooks#managing-journey-webhooks.