Skip to content

Webhook integration samples

Using webhooks, you can share customer journey data with just about any other service out there: analytics, CRM systems, marketing automation services, and much more. For example, automatically notify external services when a customer has taken a particular action within the journey, send customer data into your analytic tools, and trigger third-party emails, SMS or WhatsApp messages on specific in-journey events – there are numerous use cases, choose yours. Learn more about the Webhook element in Customer Journeys

This post shows how to implement webhooks for different use cases and services.

Send events data from a journey to Mixpanel.

Prerequisites

Anchor link to

Webhook for ingestion API (https://developer.mixpanel.com/reference/events):

URL example

Anchor link to

https://api.mixpanel.com/import?strict=1&project_id=XXXXXXX

Authorization: Basic UHVzaHdvb3NVTTWlrcjROZUE=
Content-Type: application/json

Data example

Anchor link to
[
{
"event": "PW_ApplicationOpen",
"properties": {
"time": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:datetime}}",
"distinct_id": "{{device:hwid}}",
"$insert_id": "48ae746b-0f54-47db-b96c-1f082e110ff4",
"device_type": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:device_type}}",
"application_version": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:application_version}}",
"timezone": "{{tag:Timezone}}",
"name": "{{tag:Name}}"
}
}
]

Send events data from a journey to Amplitude.

Prerequisites

Anchor link to
  • Amplitude Account

Webhook for Ingestion API (https://developers.amplitude.com/docs/http-api-v2#request-format):

https://api.amplitude.com/2/httpapi

Accept: */*Content-Type: application/json

Data example

Anchor link to
{
  "api_key": "c506ffde6db9xxxxxxa50120e22ec5",
  "events": [
    {
      "user_id": "{{device:user_id}}",
      "device_id": "{{device:hwid}}",
      "event_type": "PW_ApplicationOpen",
      "user_properties": {"timezone": "{{tag:Timezone}}", "sdk_version": "{{tag:SDK Version}}"},
      "country": "{{tag:Country}}"
    }
  ]
}

Trigger Slack messages from a journey.

Prerequisites

Anchor link to
  • Slack Account

URL example

Anchor link to

https://pushwoosh.slack.com/apps/XXXXXXXX-incoming-webhooks

Content-Type: application/json

Data example

Anchor link to
{
"text": "Hi there :smile:",
"username": "John Doe"
}

Send data to Zapier which can further be used in Zapier automation across 4000+ apps.

Prerequisites

Anchor link to
  • Zapier Account

URL example

Anchor link to

https://hooks.zapier.com/hooks/catch/XXXXXXX/xxxxxxx

Content-Type: application/json

Data example

Anchor link to
{
"hwid": "{{device:hwid}}",
"sdk": "{{tag:SDK Version}}"
}

Twillio (SMS)

Anchor link to

Send SMS from a journey

Prerequisites

Anchor link to
  • Twillio Account (access to TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN)
  • Phone number purchased

URL example

Anchor link to

https://api.twilio.com/2010-04-01/Accounts/\$TWILIO_ACCOUNT_SID/Messages.json

Content-Type: application/x-www-form-urlencoded
Authorization: Basic.... // Encode TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN with https://www.blitter.se/utils/basic-authentication-header-generator/ to get Authenticate value

Data example

Anchor link to
From=%2B18646511557&To=%2B15852826356&Body=...