Webhooks
Eric Range avatar
Written by Eric Range
Updated over a week ago

On This Page

Webhooks Overview

Webhooks are automated messages sent from applications when something happens. They have a message—or payload—and are sent to a unique URL—essentially the app's phone number or address.

Webhooks allow Element451 to communicate to other systems, enabling efficient data exchange and, most importantly, event-driven interactions when combined with rules. Element451's webhooks can be used with middleware like Zapier or Make, or work directly with other systems.

Element451 supports sending data for a single record, and not receiving data.

Creating a webhook

To get started, navigate to Data & Automation > Webhooks from the navigation bar. The index page will show you any current webhooks, the URL that is used to sent data to, and the HTTP method used. To create a webhook, click the blue "Create Webhook" button at the top left. You can populate the following options.

  • URL: This is the URL to send data to.

  • Method: This is the HTTP method that is used to send data and will most likely be POST or PUT.

  • Body Type: You can select "TEMPLATE" to use and Element451 Template or "RAW JSON" to create your own layout. XML is not currently supported.

  • Template or Body: If you selected Template, you'll be required to select an Element451 Template from your instance to use. If you select Raw JSON you'll be required to create your own JSON template. Clicking "Add Token" will allow you to insert tokens to merge data into the JSON template the same way you would add tokens when creating an email or microsite.

  • Requests Limit Per Minute: Some services have a limit of how many requests a minute it can handle, and this can be entered here.

  • Headers: Any needed headers can be entered here. This may be an APIKey, version type, or other required header. If you selected "RAW JSON" it's best to add a header with a "Content-Type" key and "application/json" value.

Once the required fields are populated, name the webhook at the top of the box, and then click save.

Your webhook is now complete. If you need to update it, click the three-dot menu button, and then click "edit".

Viewing and Testing a Webhook

After the webhook is created, you can open actions and view executions. Executions allow you to see when the webhook was last run and the returned status. If you click on the More options icon (three dots) and select open, you can see any previous runs as well as the body that was returned. The lefthand side of the screen will allow you to make adjustments to the webhook as well.

From this view, you can also test a webhook by clicking the blue "Test" button in the top left corner. You'll select a contact to use for the test and then click "run". Once the run is complete, you'll see the status code, header, and body that was returned. You can run this as many times as needed to make sure the webhook is working as expected.

You can delete a webhook from either the main webhook page or from inside the webhook by clicking the more options icon and then select "Delete".


Using a Webhook

Once a webhook has been created, you can use it in a Workflow or Rule "Execute Webhook" when adding actions to workflows and rules. Generally, it is encouraged to use rules as this would allow the record to go through the workflow rule multiple times, unlike a regular workflow which a record will only go through once. Once the rule is marked as active, the webhook will run when it is trigged by the rule. The "People" tab will show you which contact records the rule was executed for if the webhook execution was successful. However, it is important to remember that "succeeded" here just means it was successful in sending the webhook, not that a 200 status was received or that the data was received properly when the webhook was sent.

Retries

Element451 does support retries when a status of 408, 409, 502, 503, or 504 is received. After the first try, the request is delayed for 3 minutes before retrying, then 30 minutes, and finally 180 minutes.

After the 3rd try, the webhook will fail and not attempt to send that data again.

Did this answer your question?