Skip to main content

Webhooks

Updated over a month ago

The Webhook feature in Triggerbee Automation allows you to send data to a receiving Web app of your choosing.

How to set up a Webhook Automation

  1. Navigate to Automations and create a new automation.
    ​

  2. Select the trigger that should initiate the webhook, for example, a goal or campaign interaction.
    ​

  3. As the action of the automation, select "Execute webhook" from the Triggerbee library.

  4. Enter the URL for your webhook. We recommend that you keep the "Use the new format.." toggle.
    ​

  5. Give your automation a name and save it. When the automation is triggered, Triggerbee will call the webhook using a HTTP POST command and send a JSON payload of data regarding the visitor and the session.

  6. Your developer will need to analyze the JSON payload (tip: use a service like https://requestb.in ) and develop a script that can do something with it, for example, insert it into your system or funnel it to a middleware like Zapier.


Webhook Payload

The payload looks different depending on the data that can be found on the visitor and session. Sometimes, you have collected form, survey, or other custom data, and sometimes not.
​

Here are the standard fields that are always included in the payload:

{"visit":
{"SessionId":1234567,
"Uid":1234567890,
"Time":"2023-12-12T08:59:14",
"Identifier":"[email protected]",
"GeoLocation":"Stockholm, Sweden",
"Goals":["Example Goal"],
"Revenue":399.0,}
}

Here is an example of a payload that also includes custom data as well as data from form submissions (the "Fields"-collection):

{
"Uid": 1234567,
"SessionId": 1234567890,
"text":
"John Smith visited our website and completed
goals \"Submitted the form \"Popup Black friday\",
Gave consent\". 2 clicks.",
"visit": {
"Time": "2024-11-24T10:16:44",
"NetName": "Telia Network Services",
"GeoLocation": "Orebro, Sweden",
"Goals": [
"Submitted the form \"Popup Black friday\"",
"Gave consent"
],
"Revenue": 499.0,
"Consent": {
"Title": "Popup Black friday",
"CurrentWebsiteUrl": "https://triggerbee.com/",
"PrivacyPolicyUrl":
"https://privacypolicy.trgr.be/gpp/518751/18/2021-05-31-en.html",
"PrivacyPolicyText":
"By submitting to this form you agree to \n\nour privacy policy",
"IsCheckboxPresent": "true",
"VersionDate": "2021-05-31T10:00:00",
"RevisionNumber": "18"
},
"PersonalData": {
"Email": "[email protected]",
"Name": "John Smith"
},
"Fields": {
"CheckboxList1": "First item",
"Gender": "Male",
"Message": "I really like your products"
}
}
}


This payload implies that the visit of John Smith had both default and custom actions, including:

  • Submitted a form "Popup Black Friday"

  • Entered his name and email address in the form

  • Gave his consent for email marketing and privacy policy

  • Entered custom fields in a form, including:

    • Checkbox field

    • Gender

    • Message

Did this answer your question?