Sitecore Send - Webhooks

Moosend logo
Webhooks are great to connect services. Our custom service can be notified about some events which happened on external service. This is de facto a standard way of integration in a cloud-base infrastructure. And Sitecore Send provides this mechanism as well.

Where can I place webhooks in Sitecore Send?

Webhooks can be added to the Sitecore Send Automation as an Action.

Webhook action select in automation

Then the URL is needed to be added: add Webhook URL

As mentioned in the description, the endpoint should accept POST HTTP request with webhook payload.

How can I implement a custom webhook?

In this example a simple 'log' webhook will be implemented via Node.js express module.

Webhook implementation

The endpoint logic is very simple:

import express from 'express';

const app = express();

const port = 3002;'/log', (req, res) => {
    console.log(req.body, JSON.stringify(req.body));
    return res.send({success: true});

app.listen(port, () =>
    console.log(`server is listening on ${port}.`),

The key is'/log', ...) to handle POST request on /log endpoint. Inside the callback we just log to console the body of request.

The full code sources can be found here.

Webhook publication

To use the webhook in Sitecore Send we need to publish it.

The following publishing options are available:

  • publish it to some cloud-based platform: Azure, AWS, Google Cloud Platform, etc.
  • publish local server using e.g. Ngrok

Let's use Ngrok for simplicity:

Start the server
cd [webhook folder]
npm run start
Run Ngrok
cd [ngrok location]
.\ngrok http 3002

Then the URL needs to be copied: published url

So the final URL for the webhook is the following:

Configure Webhook in Sitecore Send

Then 'Post a webhook' action needs to be added to the automation: configure the webhook

Explanation. The Automation 'Reactivation' is configured to be triggered when the tag 'Reactivation' is added to existing member of specified list. Then the email should be sent. So before sending the email the 'Log' webhook is added.


The results of webhook work can be observed in the terminal: webhook results log

The payload received from Sitecore Send:

         "Name":"John Oliver",



Data scheme

Payload JSON schema can be found here.

Use cases

Webhook can be used in the following cases:

  • You can setup custom notifications in Sitecore Send with a webhook.
  • Data synchronization with some other storage or integration with another service.
  • Logging & debugging

Sitecore Send Webhooks Documentation

Sitecore Send Series