How to use webhook trigger
Our webhook automation trigger allows you to create or update contacts.
To set up a webhook trigger, select "Start from Scratch" in the automation.
Switch the trigger type to webhook by accessing the "Choose Platform" option located at the top right corner of the page.
Select the ''Webhook'' platform to continue with the automation process.
Click "Set up workflow trigger," then select the webhook trigger from the "Trigger Flow by Webhook" option located at the top right corner.
The webhook URL and Authorization token are displayed in the side panel.
To create or update a Contact
To create or update a contact, you can send a POST request to the Webhook URL.
POST
Headers
Body
Properties of contact
Response
On success, the server will respond with 204
{
"error": {
"statusCode": 400,
"name": "Name Of the Error",
"message": "Error Message"
}
}
POST /webhooks/trigger-flow/<workflow-id> HTTP/1.1
Host: apiv1.automation.app.gozen.io
authorization: <your-token>
Content-Type: application/json
Content-Length: <content-length>
{
"contact" :{
"first_name" : "John"
"email_address" : "john@example.com"
}
}
var myHeaders = new Headers();
myHeaders.append("authorization", "<your-token>");
myHeaders.append("Content-Type", "application/json");
var raw = "{\n \"contact\" :{\n \"first_name\" : \"John\"\n \"email_address\" : \"john@example.com\"\n }\n}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://apiv1.automation.app.gozen.io/webhooks/trigger-flow/<workflow-id>", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
import json
url = "https://apiv1.automation.app.gozen.io/webhooks/trigger-flow/<workflow-id>"
payload = "{\n \"contact\" :{\n \"first_name\" : \"John\"\n \"email_address\" : \"john@example.com\"\n }\n}"
headers = {
'authorization': '<your-token>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)