Automation as we know enables you to automate repetitive tasks that save the time taken to perform them manually. It can be used to automate the execution of workflow like when an event is triggered.
Studio now has the feature to Automate tasks as Automation V2. Automation v2 with an improved experience and more powerful enables us to do a lot more efficiently. In Webhook Automation the whole configuration is typically divided into two parts: Trigger and Tasks.
Select A Trigger – Webhook
The Webhook trigger is triggered when an event is received on its URL endpoint. Whenever a webhook event occurs, such as a service monitoring alert or when a payment is received, you can automate a workflow to start. The workflow can use JSON payload data from events as references to other block data. If required, you can additionally set up a workflow to reply to webhook events by sending information back to the webhook origin using the Response block.
Every webhook automation workflow has a unique webhook URL. In the studio, the Webhook trigger URL supports both the GET and POST methods.
Copy the endpoint URL and use it as the webhook event destination that will trigger webhook events.
Webhook URL – cURL request
To utilize data within an automation task, send sample data through a cURL request. You can access the body, query string, and headers from the webhook using the keyword webhook.body
, webhook.query
, webhook.headers
. Additionally, you can specify a particular key in the webhook body, such as “webhook.name” instead of “webhook.body.name”.
Send an event to the webhook manually via curl: The current cUrl request is designed solely for the purpose of capturing sample data and visualizing its data type in the editor below, without triggering the entire automation flow.
Webhook URL – Manual
To utilize data within an automation task, enter the sample data in the below JSON editor. You can access the body, query string and headers from the webhook using the keyword webhook.body
, webhook.query
, webhook.headers
. Additionally, you can specify a particular key in the webhook body, such as “webhook.name” instead of “webhook.body.name”.
Enter Sample data Manually for Testing
You can optionally provide sample data input used as a sample event payload for testing when running the automation from within the automation editor.
Select a Task or Connector
Now that the trigger is ready, you need to specify the task. So here we will specify the App and the workflow that would be the action events.
You can specify the tasks from the available list of Logic tasks and Custom API connection from the available actions.
Automation Preview:
Click on the preview button to run the automation.
NOTE: The webhook will require a payload as an example data at the time of running the workflow in preview to test the webhook.
Click Test .