Saysimple supports several out-of-the-box actions for Zapier. However, in some cases, you might want to use an action that is not yet available—for example, sending a media template. In such cases, you can use a Webhook action instead.
To use this Webhook action in Zapier, some technical knowledge of APIs and JSON is required. For more information, please refer to our API documentation.
1. Create a New Zap
To create a new Zap, log in to Zapier and click the orange + button at the top left of your screen. A dropdown with several options will appear—choose Zaps. This will take you to the Zap editor screen.
First, create your Trigger. You can choose from a variety of apps and app events. Next, set up an Action. To configure a webhook, select the Webhooks option.
2. Configure Your Webhook
To set up the webhook action, start by selecting your Action Event. Click the dropdown menu and choose Custom Request, then click the blue Continue button.
On the next screen, you'll need to configure several fields:
- For Method, select POST.
- For URL, use Saysimple’s "send new message" POST endpoint:
https://api.saysimple.io/messaging/v3/messages/send
- For Data Pass-Through?, select False.
- In the Data field, you can copy and paste the content of your JSON file as explained in our API documentation.
- For Unflatten, choose Yes.
-
And last but not least, fill in your x-api-key and Authorization token.
3. Using Different Types of WhatsApp Templates
There are various types of WhatsApp templates you can send through a webhook. Below, you'll find the most common use case:
Example of a text template
{
"contactActor": {
"identity": "[SUBMIT RECIPIENT PHONE NUMBER in the following format +31 6 XXXXXXXX]"
},
"channelActor": {
"channelId": [SUBMIT CHANNEL ID]
},
"content": {
"template": {
"id": [SUBMIT TEMPLATE ID]
},
"text": "[SUBMIT TEMPLATE BODY]"
}
}
Example of a media template
{
"contactActor": {
"identity": "[SUBMIT RECIPIENT PHONE NUMBER in the following format +31 6 XXXXXXXX]"
},
"channelActor": {
"channelId": [SUBMIT CHANNEL ID]
},
"content": {
"template": {
"id": [SUBMIT TEMPLATE ID]
},
"attachments": [
{
"payload": "https://example.com/public-image.jpg"
}
]
},
"text": "[SUBMIT TEMPLATE BODY]"
}
}
Media Template with Quick Reply Buttons
{
"contactActor": {
"identity": "[SUBMIT RECIPIENT PHONE NUMBER in the following format +31 6 XXXXXXXX]"
},
"channelActor": {
"channelId": [SUBMIT CHANNEL ID]
},
"content": {
"template": {
"id": [SUBMIT TEMPLATE ID]
},
"text": "[SUBMIT TEMPLATE BODY]",
"components": [
{
"type": "FOOTER",
"text": "FOOTER TEXT"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "BUTTON TEXT"
}
]
}
],
"attachments": [
{
"payload": "https://example.com/public-image.jpg"
}
]
}
}