Skip to content

Webhook

Webhooks let you send journey data to external services such as analytics, CRM systems, and marketing tools. You can:

  • Notify external systems when a customer takes an action in the journey
  • Send customer data to analytics tools
  • Trigger third-party emails, SMS, or WhatsApp on specific journey events

How to set up the Webhook element

Anchor link to

Add the Webhook element

Anchor link to

Drag-and-drop the Webhook element to the canvas. Place Webhook anywhere you’d like, keeping in mind what journey info you’re going to send to a third-party service.

Webhook element on canvas with name and request settings

Name the Webhook step and specify the request URL and type

Anchor link to

In the STEP NAME field, enter a name for the webhook. It might be handy to name webhooks according to the services they send data to or the use case.

Next, in the URL field, specify the request URL to which the data should be sent. Next to the URL field, select the request type from the REQUEST TYPE dropdown: GET or POST.

Webhook configuration interface showing URL field and REQUEST TYPE dropdown for selecting GET or POST method

Configure headers

Anchor link to

In the HEADERS section, set the content type.

By default, the content type is application/json. If the service you’re sending the webhook to requires another content type, enter the appropriate one in the Content-Type header value.

Examples of content types are:

  • x-www-form-urlencoded
  • text/plain
  • text/xml

Add additional headers if needed by clicking + ADD HEADER. You can remove any header by clicking the ‘x’ icon next to it.

For example, some APIs may require HTTP Basic authentication. To authenticate such requests, do the following:

  1. Open a plain text editor and type your username and password with no spaces, separated by a colon. For example: myuser:mypass
  2. Encode this string into Base64.
  3. Copy the resulting Base64 string (for example, bXl1c2VyOm15cGFzcw==).
  4. In the webhook settings, add an Authorization header with the value: Basic <YOUR BASE64 STRING>. Make sure there is a space after the word “Basic”.
Authorization header example for Basic authentication in webhook settings showing Content-Type and Authorization headers

Add the JSON request body

Anchor link to

In the DATA section, enter your JSON request body. Make sure the request body is in correct JSON format.

Example:

{
"hwid": "{{device:hwid}}"
}

Use dynamic data and macros

Anchor link to

The DATA BUILDER panel allows you to insert dynamic information (such as user, device, tag, or event data) directly into your JSON request body. With Dynamic Data, you can include values specific to the individual user progressing through the journey.

For this:

  1. Select a category. You can pull data from three categories:
  • Device: Use Device data when you need technical information tied to the user’s device.

  • Tag: Use Tag data when you want to send information stored in the user profile.

  • Event: Use Event data when the webhook should send values from the triggering event of the journey.

  1. Select a parameter (for example, HWID, favourite category, etc.).
  2. Pushwoosh generates a macro that looks like this:
{{tag:Language}}
  1. Copy the macro and paste it into your JSON body in the DATA section.

When the webhook runs in a live journey, Pushwoosh automatically replaces the macro with the actual value for that user.

Insert Dynamic Data placeholders into the webhook request body

Test the Webhook

Anchor link to

Click Test webhook to verify that your webhook configuration is correct and the request is sent successfully.

Save your configuration

Anchor link to

Click Apply to save your webhook configuration.