Adding Webhooks to Flows in Yotpo SMS & Email
Adding webhooks to flows allows you to seamlessly pass information from Yotpo SMS & Email to other applications when an event takes place. This leverages the information made available through flows, making it easily accessible for use with third-party integrations.
In this article, you’ll learn how to add webhooks to flows.
How it works
Webhooks are automatic notifications sent from one application to another when a certain event occurs. For example, when a customer completes a payment for their order, Yotpo SMS & Email can send a notification to a third-party integration which then targets the customer with follow-up offers based on the order they made. Essentially, webhooks transfer packages of data called data payloads. These payloads are formatted as code and contain information about the event that triggered the webhook.
You can add a webhook when creating a new flow or editing an existing one.
Important:
Configuring a webhook’s settings requires technical expertise and knowledge of APIs. We strongly recommend consulting a skilled developer to ensure everything is set up correctly.
Adding a webhook to a flow
To add a webhook to a new flow:
In your Yotpo SMS & Email main menu, go to Flows > My Flows and click Create flow.
Select a trigger and start building your flow.
Click +Add step, select Add action, and choose Add webhook from the list of actions.
The webhook is added to your flow. You’re now ready to set it up.
![image(58).png](http://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/image(58).png)
Configuring webhook settings
To configure a webhook’s settings:
Give the webhook a name.
Enter the callback URL where the event information will be sent.
If you want to authenticate the connection to the URL via headers, in the Headers section, add the header’s key and its corresponding value.
Please note:
You can add up to 4 headers by clicking the +Add header button.
To check whether the connection to the callback URL has been made successfully, click Send a test request.
In the JSON payload field, enter the data you want to send. You can also add shortcodes that fetch dynamic information.
Important:
The data in the JSON payload field must be formatted according to the JSON standard. To make sure the entered data is in the correct format, click Validate JSON.
After you complete the setup, you can continue customizing your flow or click Save and exit the flow builder.