Outgoing Webhooks

In this article we will explain how to send information from Emercury to another platform after an event, using outgoing webhooks.

Michael Batalha avatar
Written by Michael Batalha
Updated over a week ago

Webhooks are one of the most powerful options a piece of software can offer you. It creates endless possibilities and ways to integrate Emercury with any other parts of your business stack. In short, it's a way to automatically send whatever happens in Emercury to any of your other tools.

For example imagine that any time a subscriber opened a specific email you sent with Emercury, some information is added to Google Sheets for your sales team to follow-up with them.

Or let's say that you use some sort of meeting software. You can have it so that whenever a person fills in a form with a date, this creates a meeting event in that meeting software.

Here is how to use outgoing webhooks in Emercury

1) Head on over to settings on your top right and choose "Developer"

2) Once inside you will see a webhooks section, just click on the add button

3) Choose the outgoing option

4) Fill in the fields on top

  • In "name" give the webhook a name

  • Set the status to "Active"

  • Put in the URL of the webhook where you want to send Emercury event data

In this example we put in a hook provided by Integromat. But you would put in the URL provided to you by the software which accepts incoming data, or the webhook you built yourself.

6) Choose the event you want us to send data about

In this example we chose that Emercury sends information to the webhook anytime any subscriber gets a new tag.

That's it! Very simple!

This opens up a ton of exciting opportunities for you as you can now automatically send all information about anything that happened during your email marketing, instantly.

Note: If you don't have a developer background or understand the basics of sending data to webhooks and how it works in practice, don't worry.

We'll soon have tutorials on how you can send data to some of your favorite tools. You can either send data directly (if your tool of choice has an option to receive data), or use a general integration tool such as Zapier or Integromat as the intermediary to integrate Emercury activities with almost any software on the planet.

Example responses

If you need the format for the responses sent to you by the webhook, the easiest way is to utilize this free service: https://webhook.site/

They give you a free incoming webhook url. You can then plug that url into your Emercury outgoing webhook. Then, you can easily see the responses that Emercury is going to send to you. However, if you prefer seeing example responses, here are some of the major ones.

Update Field

{
"event": "field_updated",
"user_id": "1234",
"user_email": "[email protected]",
"subscriber_id": "10",
"subscriber_email": "[email protected]",
"added": {
"state": "Florida",
"last_updated": "2023-01-27 14:18:09"
},
"removed": {
"state": "California",
"last_updated": "2023-01-27 14:17:43"
}
}

Add Tag

{
"event": "tag_add",
"user_id": "1234",
"user_email": "[email protected]",
"subscriber_id": 13,
"db_subscriber_id": "13",
"subscription_status": "1",
"added": "2021-06-08",
"last_updated": "2023-01-27 14:15:13",
"last_send": "2022-01-27 15:41:23",
"subscriber_email": "[email protected]",
"tags": {
"5": {
"tag_id": "5",
"tag_name": "TestTag"
}
}
}

Remove Tag

{
"event": "tag_remove",
"user_id": "1234",
"user_email": "[email protected]",
"subscriber_id": 13,
"db_subscriber_id": "13",
"subscription_status": "1",
"added": "2021-06-08",
"last_updated": "2023-01-27 14:00:48",
"subscriber_email": "[email protected]",
"tags": {
"5": {
"tag_id": "5",
"tag_name": "TestTag"
}
}
}

Add to List

{
"event": "subscribe_add",
"user_id": "1234",
"subscriber_id": 13,
"list_id": 98765,
"subscription_status": "1",
"added": "2023-01-27",
"last_updated": "2023-01-27 14:38:35",
"subscriber_email": "[email protected]"
}

Remove from List

{
"event": "subscribe_remove",
"user_id": 1234,
"audience_id": 98765,
"subscribers": {
"10": {
"subscriber_id": "13",
"subscription_status": "1",
"added": "2021-06-08",
"last_updated": "2023-01-27 14:36:34",
"last_send": "2022-01-27 15:41:23",
"subscriber_email": "[email protected]"
},
"13": {
"subscriber_id": "14",
"subscription_status": "1",
"added": "2023-01-27",
"last_updated": "2023-01-27 14:38:35",
"subscriber_email": "[email protected]"
}
}
}

Opened email

{
"user_id": 1234,
"event": "opened",
"opened": true,
"unique": "true",
"opens_number": "0",
"is_mobile": 0,
"user_agent": "Firefox",
"db_subscriber_id": 13,
"db_subscriber_email": "[email protected]"
}

Clicked link

{
"user_id": 14,
"event": "clicked",
"clicked": true,
"url": "https://www.emercury.net/",
"is_mobile": 0,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
"db_subscriber_id": 13,
"db_subscriber_email": "[email protected]"
}

Unsubscribed

{
"user_id": 4533,
"event": "unsubscribe",
"db_unsubscriber_id": 12345678,
"db_subscriber_id": 13,
"db_subscriber_email": "[email protected]"
}

Did this answer your question?