Configure a webhook
To configure a webhook for your environment, go to Settings > Jobs > Monitoring & Alerts. For each webhook that is available to configure, there are two fields:Name | Description |
---|---|
Webhook URL | This is the webhook endpoint you want hotglue to send POST requests to |
Webhook Secret | Optional - if provided, hotglue will generate a signature of every payload using this secret and include it as the X-Hub-Signature in the request headers. Used to verify the payload is from hotglue. |
Available Webhook Subscriptions
You can subscribe to any of three primary types of events using hotglue webhooks:- Job Lifecycle
- Discover
- Connection
1. Job Lifecycle Webhook
This is the primary subscription that most hotglue workflows rely on. The job lifecycle webhook sends a POST request to your hook every time a job moves forward in the job lifecycle. You can read about the job lifecycle here.Example payload
JSON
2. Discover Webhook
This is a useful subscription if you have workflows that rely on a successful discover completing, such as custom field mapping or in-widget table selection. Like the job lifecycle webhook, the discover webhook sends a POST request to your hook every time a discover task moves forward in the discover lifecycle. The discover lifecycle has three possible events:DISCOVER_STARTED
DISCOVER_SUCCESS
DISCOVER_FAILED
Example Payload
JSON
3. Connection Webhook
This is a useful subscription if you would like to take action when users link or unlink an integration in hotglue, or would otherwise like to create an internal database table to monitor connections. The connection webhook sends a POST request to your hook whenever alinkedSource
, linkedTarget
, or linkedConnector
is created, overwritten, or removed.
Example Payload
JSON
Validating the signature
If you’ve chosen to set a webhook secret, we will send anX-Hub-Signature
in the request headers to your webhook URL. The purpose of this is to verify that the payload came from hotglue.
See below for sample logic for how to validate the signature using JavaScript.
webhook-verification.js