Respond to webhook events with the Response block
Learn how to return data using a webhook response in a workflow.
Use Response blocks to configure custom responses to webhook events that trigger workflows. This block returns data to the origin along with a specified HTTP status code.
Webhook-triggered workflows without a Response block immediately respond to the origin. Workflows with a Response block do not respond until this block runs, returning the specified data and HTTP status code.
The Response block is for use in workflows that provide a timely response to a webhook event. There is a 120-second timeout per block when triggering synchronous workflows.
Add a Response block
To respond to webhooks, add a Response block to the canvas.
For example, you could use a workflow to look up customer details based on their email, which is returned in the webhook response. You can specify the HTTP status code and a JSON response body to return, which can include any data from the workflow. The demo below illustrates a brief example of this.
Respond differently based on conditions
You can add multiple Response blocks to return different responses based on certain conditions. For example, if there are no results when attempting to look up a customer by email, a different response block could return an error message and status code.
You can also configure a Response block to act as global error handler, which runs if an error occurs in a workflow.
Configure block settings
You can configure the following settings for Response blocks.