A webhook allows one application (like Mailmodo) to send real-time data to another application or system whenever a specific event or trigger occurs.
Let’s assume you have created a journey with a trigger like a new user signing up, a payment being made, or a form being filled in your campaign. By adding the webhook block in the journey, as soon as a user signs up or matches the trigger, the webhook is triggered.
This initiates the process of sending a welcome email as soon as a user registers. It ensures that the welcome email is sent in real-time, creating a positive and seamless user experience. Additionally, the webhook can be customized to include specific data or instructions for the welcome email, making it highly personalized for each user.
When creating a webhook, the receiving application must accept POST requests and have an API. In addition, we only support sending HTTPS requests to the default HTTPS port.
How to add a webhook block as an action?
Step 1: Drag and drop the Webhook card from Actions in the left panel.
Step 2: Connect it to the relevant card in the journey as per your requirement
Step 3: Click on the Webhook card which will open a right panel for setting up the Webhook
For setting up the Webhook, you will need to enter the following information:
- Request URL
Mailmodo needs a URL to deliver requests to. This means you need to set up a URL accessible from the public web. This is usually done through a backend panel or an API.
You can customize the headers that are sent along with the HTTP request when the webhook is triggered. The following are some of the examples of customer headers:
a. Authentication tokensFor example -
Authorization: Bearer your_api_token_here
b. Specify the format of the data being sent
For example -
- Custom payload
a. You can also customize and configure the payload which ensures that the information is relevant, well-structured, and protected, promoting efficient data exchange and integration while accommodating various use cases and versions of the recipient application.
"user": "John Doe",
b. You can add personalization parameters to the payload by adding the '$' symbol. You can also enter the fallback value for the parameter selected.
How to test a webhook?
- Visit Webhook.site: Go to the Webhook.site website. The URL is usually something like
https://webhook.site/your-unique-identifier. You'll see a screen with a unique URL generated for your testing session.
- Copy the Webhook URL: Copy the unique URL provided on the Webhook.site page. This URL is where you'll send your webhook data for testing.
- Add Webhook block in the journey: Go back to your journey builder and add the Webhook block in the journey. Paste the webhook URL in this webhook block and JSON payload if any.
- Test the Journeyof: Click on the “Test journey” button on the top right corner in the journey builder enter the email ID (preferably yours) and start the journey.
- View Webhook Data: Go back to the Webhook.site page in your browser. You should see the details of the webhook request that was sent, including the headers, payload, and any other relevant information.