Breadcrumbs

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

  1. Install the Requests library by running pip install requests

  2. Open up Python in your terminal window by typing python or python3

  3. Run the following python code:

import requests

r = requests.post('<WEBHOOK_URL>')
r.status_code
r.json()

Bash

  1. Open up your terminal window and run the following command.

curl -X POST <WEBHOOK_URL> | json_p

Node

  1. Install the axios library by running npm install axios

  2. Open up Node in your terminal window by typing node

  3. 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

  1. Check to see if the Webhook Status Code is 201. If so, your Task or Workflow was scheduled to run successfully.

  2. Navigate to the Logs Tab for your Task or Workflow to verify that it ran correctly.