Webhook Chains
Chains let you wire webhooks in sequence — when one webhook delivers successfully, it automatically fires the next webhook with the combined payload, enabling multi-step webhook pipelines.
Overview
A chain is a list of connections on a webhook's chainedWebhooks array. When the primary delivery succeeds, HostWebhook fires each chained webhook with a payload that includes both the original event and the previous delivery's response. Chains execute sequentially — step 2 waits for step 1.
Each step receives the original payload plus the previous step's response.
Chain payload structure
When a chained webhook fires, it receives a wrapped payload containing the original event data and the previous step's delivery result:
{
"original": {
"type": "order.created",
"data": {
"orderId": "ord_123",
"amount": 9900,
"currency": "usd"
}
},
"previous": {
"status": 200,
"body": {
"processed": true,
"internalId": "inv_456",
"shippingEstimate": "2025-05-22"
},
"headers": {
"content-type": "application/json",
"x-request-id": "req_abc"
}
}
}previous contains only the immediately preceding step's response — not all prior steps. If you need data from step 1 at step 3, it must be forwarded through step 2's response.Configuration
Chain connections are defined on the source webhook's chainedWebhooks array:
| Field | Type | Description |
|---|---|---|
| webhookId | string | The ID of the next webhook in the chain |
| continueOnFailure | boolean | If true, the chain continues even if this step's delivery fails (default: false) |
Configure via API
PATCH /api/webhooks/:id
{
"chainedWebhooks": [
{
"webhookId": "664a1f2e8b1c4a001f2d0002",
"continueOnFailure": false
},
{
"webhookId": "664a1f2e8b1c4a001f2d0003",
"continueOnFailure": true
}
]
}Bridge transforms
A bridge transform modifies the payload between chain steps. This lets you reshape the original + previous payload before it reaches the next webhook. Bridge transforms use the same {{path}} interpolation syntax as payload transforms.
{
"orderId": "{{original.data.orderId}}",
"internalId": "{{previous.body.internalId}}",
"shippingDate": "{{previous.body.shippingEstimate}}",
"amount": "{{original.data.amount}}"
}original / previous structure into the format the next webhook expects.Limits & safety
| Limit | Value | Purpose |
|---|---|---|
| Max chain steps | 10 | Prevents excessively long chains |
| Max propagation depth | 10 | Prevents loops when chains trigger other chains |
| continueOnFailure | Per connection | Controls whether a failure stops the chain |
Loop prevention
The pipeline engine tracks propagationDepth across chain executions. If a chain triggers another chain (or circles back to the same webhook), the depth increments. At depth 10, the chain is terminated with an error to prevent infinite loops.
Canvas layout
On the canvas, chained webhooks are laid out horizontally — chains go to the right. This visual convention makes it easy to identify sequential chain flows.
[Webhook A] ──chain──▶ [Webhook B] ──chain──▶ [Webhook C]Error handling
When continueOnFailure is false (the default), a failed delivery at any chain step stops the entire chain. Subsequent steps are not executed.
When continueOnFailure is true, the chain continues to the next step even if the current step fails. The previous payload will contain the error response instead of a success response.