Skip to main content
Webhooks - Automations

Use webhooks to collect data of your automations

Kateřina Irová avatar
Written by Kateřina Irová
Updated over a week ago

Ecomail allows you to send information out of Ecomail and collect them for further use. You can use so-called webhooks.

ℹ️ For testing webhooks, we recommend using https://requestbin.com/.

Webhooks are delivered to the specified URL address using the POST method in JSON format with the following content:

{"account": "foo", "pipeline": 1, "action": 2, "subscribers":[{"id":792107,"name":null,"email":"webhooks3@potentus.com","gender":null,"inserted_at":"2016-04-20 09:49:14","last_position":null,"surname":null}]}

account - account ID at Ecomail

pipeline - automation ID

action - action ID

subscribers - an array with JSON objects of users affected by the event

The processing of the webhook then depends on the language you are using. In case of PHP it can be for example like this:

$json = json_decode(file_get_contents('php://input')); 

Webhooks in automations

You can set up a step in your automation that will send the data update to your webhook. The automation can look like this:

Send to webhook step will then look like this:

ℹ️ Currently, Ecomail does not handle whether the webhook has been successfully processed or not and leaves this responsibility to the customer.

Did this answer your question?