Overview
When sending a webhook to Tray that requires a response, you can utilise the Trigger Event Reply connector to send the response, and customise it if necessary. Some services may only need a 200 response, while others may need you to parrot a specific token back to them for security purposes, or include other parameters.
Responding to Webhooks
The inputs available in the Trigger Event Reply connector will depend on the Webhook Trigger operation selected. Auto respond with HTTP 200 and Validate and respond both handle the reply at the time the webhook is received, and don’t require any other responses from the Trigger Event Reply connector. The connector’s inputs will be empty and give the option to add a property.
Customising the Response
If your service requires a response that contains parameters not covered by the auto respond or validate and respond options, you can set the Webhook Trigger to the Await workflow and respond operation, after which, the trigger Event Reply connector will have Status and Body properties to add input to, and will have it will also have the Show advanced properties button available to adjust any headers if needed.
Slack response example
If you were to manually subscribe to Slack events in Tray, Slack initially sends a webhook to the specified endpoint URL, and that URL will need to parrot back a challenge value for verification. Here’s an example of how this could be configured:
The webhook arrives with a challenge parameter in the body, which we can set the Trigger Event Reply connector to include in its body to respond back with. The 200 status is visible in the Output log to show this response was successful.
Comments
0 comments
Please sign in to leave a comment.