In a flow using the call a webhook action, the webhook can POST flow data structured as JSON to an external service or the webhook can GET data from an external service.The response body will only be processed if it is a valid JSON.
We understand that you might want to access the metadata associated with the response received from a webhook. With this in mind, @webhook
is now an object with properties like status, JSON, and header.
@webhook.headers
is now an object of all the response headers, accessing details about the request or response. For example, the format of the data in the body, language, and other characteristics such as content type; e.g. @(webhook.headers["Content-Type"])
.
The status code @webhook.status
will help you understand the nature of the response and how to handle it. The three-digit numerical code is typically accompanied by a textual description, like "404 Not Found" or "500 Internal Server Error".
Want to know more information about the event? @webhook.json
contains data that the server is sending back in response to a request, such as the authentication information, timestamp, and any specific identifiers associated with the event.
We hope this helps you inspect and work with the response you get from each webhook call. You can now better understand & handle errors and troubleshoot any issues that may arise during communication with the webhook call endpoint.
Finally, you can inspect the response headers, which are essential for understanding and effectively handling the response. Enforcing security measures and optimizing performance will ensure a smooth ride for your contacts in your flows. 🚀
If you have any questions or just want to run some ideas by the team, we are always happy to help.