Sending webhooks

Webhook is a mechanism of notifying a system about events. Webhook in Automation 360 is a way to notify your system about events that happen to messages in automations.

When would one need to send a webhook?

Sending webhooks allows SendPulse service you to receive updates when customers' status changes or when the automated series reaches a specific goal.

For example, leads leave requests on your site; their contact details are sent to your CRM system and are synchronized with SendPulse. An Automation 360 flow starts for these leads to warm them up. You want to call everyone who opens the third email from the flow. To do this, you need to change the status of the leads in your CRM. You can do this with the help of a webhook by sending data about an event to your system.

How to send a webhook in an automation flow

To send event notifications to another system, link the "Action" - "Send webhook" block to the block from which you want to track an event. You can track receiving or opening an email, filtering by a specified condition, achieving a goal, or any other action performed by a subscriber within an automation flow.

Webhook settings in A360

Specify a webhook name and a URL to which the webhook will be sent. Only numbers and Latin characters are allowed in a webhook name.

Configure sending the key in response to the first webhook to remove the limit for sending webhooks. Otherwise, the service will allow you to send one webhook per hour.

The key for removing webhook frequency limits

Webhook structure

[
            'automation_id' => $ aflow-> main_id,
            'title' => $ afOperator ['webhook_title'],
            'execution_date' => new \ DateTime (),
            'email' => $ email,
            'phone' => $ phone,
            'variables' => $ variables,
        ];

A webhook transmits such data:

  • a flow ID
  • a webhook name
  • a webhook trigger date
  • an email address and a phone number of a subscriber for whom the webhook is sent;
  • variable data.

If an automation starts by a mailing list, variables from the mailing list are sent in the webhook. If an automation starts by an event, variables from the event are sent in the webhook.

How to track unsubscribes and spam complaints

You can configure tracking unsubscribes and spam complaints in your account settings.

An example of a spam complaint webhook

[
  {
    "timestamp": 1496827422,
    "event": "spam",
    "task_id": 3668141,
    "email": "john.doe@sendpulse.com"
    "source": "automation360"
    "automation_id": $ aflow-> main_id
 
  }
]

An example of an unsubscribe webhook

[
  {
    "task_id": "3668141",
    "timestamp": "1496827872",
    "from_all": 1,
    "email": "john.doe@sendpulse.com",
    "reason": null,
    "book_id": 490686,
    "event": "unsubscribe",
    "categories": ""
    "source": "automation360"
    "automation_id": $ aflow-> main_id

  }
]
Rate this article about "Sending webhooks"

User Rating: 4 / 5 (5)

    Other useful articles

    Popular in Our Blog

    Try SendPulse today for free