Skip to main content

Configuring webhooks

Overview

Webhook blocks allow you to send data to an external API once a user reaches the block. This guide will walkthrough how to set up a webhook block and test it to make sure it’s working properly.

Configuration

Webhooks can be configured to send to a specific target URL with specified request headers and a request body.

note

Webhook blocks only support POST requests at this time.

Select the webhook block that you would like to configure. In the block panel, enter in the URL to send the request to.

You can optionally define request headers to be sent alongside the webhook. Request headers are separated into name and value. For example, the header name would be content-type and the header value would be application/json. You can add additional headers by clicking + Add.

You can also optionally define a JSON request body. The request body accepts tokenized values that dynamically evaluate to information about the user, flow, and the request itself.

A request body looks something like this:

{
"date": "${timestamp}",
"message": "A user (${user.identifier}) completed ${flow.name}"
}

Once you are done configuring your webhook, you can click the Save button at the bottom of the panel to save the webhook.

Testing

You can test your webhook At any time while you are configuring it. To test your webhook, click the Test button at the bottom of the panel.

This will send a request to the specified URL with any request headers and request body specified. If the body has tokens in it, they will be replaced with placeholder values.

Once the test is sent, the returned HTTP status code (e.g., 200) will be displayed.