Know how to use the Return Data on Sync Webhook action.
About this task
The Return Data on Sync Webhook action allows you to run a workflow by
calling a URL (webhook URL) and get the workflow's output in the body of the URL.
A workflow is available that creates a board in your Trello account. The workflow posts the
details of the board on the specified Slack channel and also sends the board details through
email.
Procedure
-
After all the actions are configured and connected, double-click the
Start icon. A new screen appears to contain a list of trigger services.
Select the Webhook trigger from the list.
- On clicking the Webhook trigger, a unique webhook URL is
generated. You can optionally add an extra layer of security to your webhook URL by enabling the
webhook authentication option. Click Next and then
Done to go back to the canvas.
- If you now access this webhook URL in any browser, the workflow runs and you receive the
response in the browser window.
- Add the Return Data on Sync Webhook action to your workflow. In
the example, add the action after the Send an email action.
- Configure the Return Data on Sync Webhook action and insert values
in the given fields.
- Response Headers - Enter the details of a single or multiple headers in a key-value pair
format. In the example, as the workflow output is straightforward and does not require any header
details, header values are not entered. If in your case the application requires this input, enter
the header details in the required key-value pair format.
- Response Data (Mandatory) - Add the output of any of the previous actions that you want
to retrieve through the webhook. It is possible to add more than one output from the previous
actions in this field. You can select the outputs from the list that is given on the left side of
the window. In the example, select the board name for the Response Data
field.
- Status code - Enter the status code value that you want to display along with the output.
By default the value for this field is set to 200. You can also specify the custom
message.
- Content Type - Select or specify the content type in which you want to receive the
workflow output.
- After you add this action to your workflow, /sync/v2/ is included in
your webhook URL. The Return Data on Sync Webhook syncs the workflow with the
webhook URL and sends the workflow output to it when the Webhook URL is
accessed.
Note:
When you configure the Return Data on Sync Webhook action in your
workflow, the system expects the action to trigger within the timeout period defined in the
Workflow Settings. The webhook URL you trigger must receive a response from
this action within the specified timeout. The default timeout is 3 minutes after the sync webhook
URL is triggered. The maximum timeout is 6 minutes. If the webhook does not receive a response
within the timeout period, it returns a 408 Request Timeout error. This error means the server
closes the connection because it does not receive a response in time. Browsers such as Google Chrome
and Microsoft Edge retry the request automatically before they show the 408 error. Because of this,
the error may appear only after several attempts and a longer delay. Tools such as Postman return
the 408 error shortly after the timeout period ends, without any retries.
When the Webhook URL is accessed, you can see the required board details
on the screen.