Reply to webhook
Sets the answer to the webhook request that started the macro, when the trigger waits for a reply.
Reply to the webhook with status
Details #
Use this in a macro started by a Webhook with reply: "wait". The request stays open until this step runs; the status, headers and body you give are sent back to the caller. The first Reply step a run executes wins; a later one does nothing (the editor warns about it).
A string body is sent as text. An object or list is sent as JSON. With no Reply step, a waiting webhook answers 200 with the run's last result as text, or 500 with {error, step} if the macro failed.
The step does not end the macro: anything after it still runs, after the caller already has its answer.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
body | any value | Text, or an object or list sent as JSON. Supports {{ }} values. | ||
contentType | text | The Content-Type. Defaults to text/plain for text and application/json for objects. | ||
headers | record | An object of response headers. | ||
status | number | The HTTP status, 100 to 599. Defaults to 200. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- A GET webhook is called at /status
- Reply to the webhook with 200
Gotchas #
Dry run. Simulated: nothing is sent.
A macro with this step and no webhook trigger set to wait has nobody to answer; the editor warns.
The traced output shows the status and size, not the whole body.