Connect your Dotdigital flows to PostPilot to trigger perfectly timed direct mail campaigns.
Before you start
Things you need to know:
- You must have a Dotdigital and PostPilot account.
- You should be familiar with Dotdigital's Enable a program webhook article.
1. Create an API key and Flow in PostPilot
-
To create an API connection in PostPilot, follow the directions in our Creating an API Connection for external use.
-
To create a flow in PostPilot, which will be triggered by the program webhook in Dotdigital, follow the steps in our Using an External API Connection in PostPilot Flows article.
You need the URL for the Flow you create in PostPilot to use in your webhook.
2. Create a PostPilot profile in Dotdigital
- Go to Connect > Webhooks.
- Select NEW WEBHOOK and in the side panel:
- For Webhook name enter PostPilot.
- For Base URL enter https://api.postpilot.com/v1.
- Leave the Limit request rate switch set to No.
- Expand the Authentication section, then expand the Authentication type drop-down menu and select None.
- Select SAVE.
3. Configure your PostPilot webhook
-
Go to Automation > Programs, and create a new program, or edit an existing one.
Learn more in the Program builder section of the Help Centre. -
From the Webhooks section of the left side panel, drag the PostPilot webhook node onto the canvas.
-
Select the node to open the configuration side panel.
-
For Endpoint, add the remaining URL path for the PostPilot Flow you created in step 1.
You don’t need to include https://api.postpilot.com/v1 as this is the base URL automatically used for your webhook. For example, if the URL for your PostPilot Flow ishttps://api.postpilot.com/v1/12abc345-1a23-1234-5678-12abcde34567/flows/1234/triggers
then you would only need to enter/12abc345-1a23-1234-5678-12abcde34567/flows/1234/triggers
.
-
Expand the Method drop-down menu and select POST.
-
Expand the Content-type drop-down menu and select application/json.
-
Optionally, add some Node text.
This is a description which displays on the node on the program builder canvas. -
Expand the Headers and body data section, and in the Body data field, enter
{
"reference_id": "@EMAIL@",
"firstname": "@FIRSTNAME@",
"lastname": "@LASTNAME@",
"email": "@EMAIL@",
"line1": "@BILLING_ADDRESS_1@",
"line2": "@BILLING_ADDRESS_2@",
"city": "@BILLING_CITY@",
"state": "@BILLING_STATE@",
"postal_code": "@BILLING_POSTCODE@",
"country": "@BILLING_COUNTRY@"
}
![](https://dotdigital-1759ae17a9ad.intercom-attachments-1.com/i/o/1056144731/9d20646c7db252c455acf9a1/s_D833F4B872ACD788D93D6492A0085FF63A2B07D378C42EE58B07FDCE395DB245_1714480082283_test-webhook.png?expires=1720201500&signature=e2ba431678442d913e7f3dd5b52554d3563e281e1d6a38423cf8047609b0b65b)
10. When you’re happy with your configuration, select APPLY.
Data requirements
It's always your responsibility to ensure you're supplying good, executable data, or your webhook could fail.
4. Activate the send block in PostPilot
We advise that you clear any pending events in your PostPilot Flow before you enable the send block, in case any contacts were added to the Flow during testing.
Learn more in our Setting up your first Flow article.