How-To: Execute a Webhook Trigger
For information on how to add or manage your webhook trigger, see this documentation.
Overview
Setting up a Webhook Trigger allows you to programmatically run the Workflow from an external service. Webhooks can be used by running a POST request against the provided webhook URL. This how to guide will walk you through the steps to execute a Webhook Trigger.
Step 1 - Execution
Python
Install the Requests library by running
pip install requests
Open up Python in your terminal window by typing
python
orpython3
Run the following python code:
import requests
r = requests.post('<WEBHOOK_URL>')
r.status_code
r.json()
Bash
Open up your terminal window and run the following command.
curl -X POST <WEBHOOK_URL> | json_p
Node
Install the axios library by running
npm install axios
Open up Node in your terminal window by typing
node
Run the following node code:
const axios = require("axios");
axios
.post("<WEBHOOK_URL>")
.then((res) => {
console.log(`statusCode: ${res.statusCode}`);
console.log(res);
})
.catch((error) => {
console.error(error);
});
Step 2 - Verification
Check to see if the Webhook Status Code is 201. If so, your Task or Workflow was scheduled to run successfully.
Navigate to the Logs Tab for your Task or Workflow to verify that it ran correctly.