Webhook - Integrate with external apps
What is Webhook?
Webhooks are user-defined HTTP callbacks. They are triggered by events and are useful for integrating third-party apps with Distill. You can use webhook action in Distill to send POST requests to a webhook URL.
How to use Webhook action in Distill?
You can set webhook action from the actions list. It is available to paid customers only.
Here are the steps to add the webhook action.
-
Go to the “Options page” by clicking on the monitor’s context menu option from down caret icon as shown below.
-
From the actions list, select “Webhook call” and add Webhook URL in the placeholder.
-
Click on “Show Options” under Webhook to configure the Webhook parameters that you need to send as a POST request.
-
You can also configure header parameters by clicking on “Header” under Webhook.
-
Save once you are done with webhook configurations.
Webhook Parameters
The following values can be used in the webhook parameter’s field.
- {{sieve.id}} - Id of the monitor.
- {{sieve.name}} - Name of the monitor.
- {{sieve.tags}} - The label of the monitor. This only works in cloud.
- {{sieve.uri}} - URL of the monitor.
- {{sieve_data.text}} - Text value of the monitor.
- {{sieve_data.ts}} - Timestamp when change was detected.
- {{sieve_data.data}} - HTML data of the monitor.
You can also combine the values. For example, value in a field can be: {{sieve_data.name}} - {{sieve.uri}} - {{sieve_data.text}}
This is how the default webhook fields look like. Additionally, you can add parameters by clicking on “Add Query Param”.
Troubleshooting
- Make sure that the webhook URL is publicly accessible.
- Check if you are subscribed to a paid plan from https://monitor.distill.io/#/settings/billing.
- Check if you have not reached the monthly quota for webhook actions from https://monitor.distill.io/#/usage/monthly.
- To test your Webhook URL, you can add a test monitor for https://www.timeanddate.com/ (select current time) in Distill’s browser extension, and manually run the monitor to check the POST data. You can also use services like POSTMAN to send GET and receive POST requests on your test URL.
How to test the Webhook?
-
Add a test monitor for https://www.timeanddate.com/ in the browser extension.
-
Set webhook action and add a webhook URL from a testing provider site like https://webhook.site/ and save.
-
Manually check this monitor from the Watchlist by clicking on the run button.
-
Open the webhook site to check the POST data. It starts with https://webhook.site/#!/ followed by the URL id. This is how it looks like for the above test URL.