With Webhooks, you can send HTTP requests to a third-party application every time when an event or action occurs on your application. Simply put, when an event happens in your webpage, you can notify a third-party application automatically without continuously polling for data.
Let’s say you have an e-commerce website and you have a billing application integrated with your application. So every time when a purchase happens, you can notify the billing system automatically using their webhook URL.
Using Webhooks, you can automatically push data to your application through which you can have a simple one-to-one connection that runs automatically.
Whenever an event occurs in your web application, a POST event will be sent in a JSON format to the Webhook URL you’ve configured.
The URL will be called automatically every time when a specified action/event happens for the contacts. For example, whenever a new contact is added, you can configure the web application to push data to your app’s webhook URL automatically.
Using Webhooks in Marketing Journeys:
Drag and drop the Webhooks block that’s under the Actions.
Click on Choose or Create a Webhook. This brings up a popup providing the option to choose from the list of available webhooks or create a new one.
Click Create New Webhook. This brings up the page where you can configure the webhooks.
Configure your Webhook URL’s details:
Webhook name: Provide a name for the Webhook
URL: Input your webhook URL. If there are any required parameters on your URL, you can add them as a placeholder using the below option.
Required Authentication: If your third-party application URL is protected and requires authentication, you can authenticate using two ways. Through Basic, you can pass a Username and Password and through Token, a token or API key can be passed to authenticate and help access the URL.
Add Custom Header: If your Webhook URL requires any additional information with the content such as security information, etc. those can be added as custom headers by enabling this option.
Add custom payload: Apart from default event trigger information, you can add your own custom contact/event properties in your payload as well. Those events will be sent as JSON data on the HTTP request body.
Test your Webhooks: You can test your Webhook URL with sample data. The response status received should be 200 and any other response other than that is considered as a failure. This helps you identify if your Webhook URL is valid or not.
Click Create Webhook once the configuration is complete.
Sample Journey using Webhooks:
Here the Webhook URL will be called whenever the contacts from the list ‘Test’ clicks on the email campaign ‘Sample’ that has been sent.