Webhook Source

Step-by-step guide to add a Webhook source in RudderStack.

RudderStack lets you add any source that supports a webhook and use it to send events to your preferred destination.

This guide will help you set up a webhook source in RudderStack.

You must also add User Transformationsarrow-up-right to transform the event data into a destination-specific format.

Getting started

This section details the steps involved in setting up a webhook source in the RudderStack dashboard.

As an example, we will ingest events from Mailchimparrow-up-right into RudderStack by configuring a webhook.

Webhook source in RudderStack dashboard

  • Assign a name to your source and click on Next.

  • Your webhook source is now created, as shown below. Note the Webhook URL containing the Write key as a query parameter, as shown:

Webhook endpoint

The webhook URL is of the following format:

http://<DATA_PLANE_URL>/v1/webhook?writeKey=<WRITE_KEY>

For more information on the data plane URL, refer to thisarrow-up-right section.

A sample webhook URL is shown below:

https://hosted.rudderlabs.com/v1/webhook?writeKey=1bCenS7ynqHh8ETX8s5Crjh22J
  • Then, add a destination in RudderStack and connect it to this webhook source. For this example, we will configure Google Analyticsarrow-up-right as a destination, as shown:

GA destination

Follow our guide on Adding a Destinationarrow-up-right for more details.

  • Next, add the webhook URL to your desired source platform. Remember that you can configure webhook sources only for the source platforms that support webhooks. The following image shows the webhook URL added in Mailchimp:

Adding the webhook to an event source

Remember to add and test your webhook URL.

  • When your users perform any action that is configured in the source, the source platform will automatically send the generated events to the webhook URL.

In this example, Mailchimp sends the updates under What type of updates should we send? (seen in the image above) as user events to the webhook URL with the content type application/x-www-form-urlencoded.

The content type can vary in case of other webhook sources.

  • RudderStack then takes the data, creates the payload and sends it to Google Analytics.

You must also add the appropriate User Transformationarrow-up-right to transform the payload into a destination-specific format before sending it to the destination. Refer to the Payload creation and transformation section for more details.

Payload creation and transformation

This section details how RudderStack receives the data from the webhook source platform and creates the resulting payload.

Continuing with our Mailchimp example, suppose a customer subscribes to Mailchimp. Mailchimp then sends the following data to RudderStack:

RudderStack receives this data and creates the following payload:

You can then transform this payload according to the desired destination with the help of RudderStack's Transformationsarrow-up-right feature.

A sample transformation is as shown below:

The transformed payload is shown below:

RudderStack then sends this payload to your destination - Google Analytics, in this case.

Contact us

For queries on any of the sections covered in this guide, you can contact usenvelope or start a conversation in our Slackarrow-up-right community.

Last updated

Was this helpful?