Description
Respond to the Webhook trigger HTTP request with a custom body/status/headers. Use it AT THE END of the workflow when the caller is waiting for a response. Modes: JSON, Text, HTML, Redirect, Binary file, 204 No Content, or Custom.
action_webhook_respond · action · HTTP & Webhook · Available · v2.0.0
Respond to the Webhook trigger HTTP request with a custom body/status/headers. Use it AT THE END of the workflow when the caller is waiting for a response. Modes: JSON, Text, HTML, Redirect, Binary file, 204 No Content, or Custom.
Fields shown in the editor when configuring the node. Generated directly from the NodeDefconfigFields.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
respondWithTipo di risposta | enumjsontexthtmlredirectbinaryemptycustom | yes | json | json = serializza input come application/json (default per API REST). text = plain text. html = pagina HTML (text/html). redirect = 302 con header Location verso un altro URL. binary = file binario (input atteso in base64, output con il contentType configurato — es. application/pdf, image/png). empty = 204 No Content, nessun body (per webhook ACK silenziosi tipo Slack). custom = controllo totale su body + contentType + headers (per casi avanzati). |
statusPresetCodice di stato | enum200 OK201 Created202 Accepted204 No Content301 Moved Permanently302 Found304 Not Modified400 Bad Request401 Unauthorized403 Forbidden404 Not Found409 Conflict410 Gone422 Unprocessable Entity429 Too Many Requests500 Internal Server Error502 Bad Gateway503 Service UnavailableCustom (specifica sotto) | no | 200 OK | Codice HTTP da restituire. I preset coprono il 95% dei casi. Scegli "Custom" e usa il campo "Status personalizzato" sotto per codici non standard (es. 418 I'm a teapot, 451 Unavailable for Legal Reasons). |
statusStatus personalizzato | number | no | — es. 418 | Usato SOLO quando "Codice di stato" = Custom. Range 100-599. |
bodyBody della risposta | expression | no | — {"ok":true,"data":{{$node.Transform.json}}} oppure <html><h1>{{input.title}}</h1></html> | Contenuto da restituire. Supporta {{espressioni}} con valori dai nodi precedenti. Se VUOTO: per JSON serializza l'input del nodo precedente; per Text/HTML usa l'input come stringa. |
redirectLocationURL di redirect | expression | no | — https://example.com/grazie oppure /pagina/successo?id={{input.orderId}} | Destinazione del redirect. Può essere assoluto (https://...) o relativo (/path). Imposta automaticamente lo header "Location" e usa status 302 se non specificato. |
binaryDataDati binari (base64) | expression | no | — {{$node.PDF_Generate.base64}} | Body binario codificato in base64. Tipicamente l'output di un nodo File Read o PDF Generate. Viene decodificato server-side prima di scriverlo sulla response. |
binaryContentTypeContent-Type binario | enumapplication/pdfapplication/zipimage/pngimage/jpegimage/gifimage/webpimage/svg+xmlaudio/mpegaudio/wavvideo/mp4application/octet-stream | no | application/octet-stream | MIME del file binario. application/octet-stream = "scarica come file generico". |
binaryFilenameNome file (per download) | expression | no | — report-{{input.id}}.pdf | Quando impostato, aggiunge header Content-Disposition: attachment; filename="..." così il browser apre il dialogo di salvataggio invece di renderizzare inline. |
contentTypeContent-Type personalizzato | enumapplication/jsontext/html; charset=utf-8text/plain; charset=utf-8application/xmltext/xmltext/csvapplication/javascriptapplication/yamlapplication/octet-stream | no | application/json | MIME esplicito del body. Usato solo in modalità Custom (le altre modalità impostano automaticamente il tipo corretto). |
customBodyBody custom | expression | no | — qualsiasi stringa, supporta {{espressioni}} | Body completamente sotto il tuo controllo. Vuoto = stringa vuota. |
corsOriginAccess-Control-Allow-Origin | string | no | — * oppure https://miosito.com | Header CORS. Necessario se la response viene letta da un browser su un dominio diverso. "*" = qualsiasi origine (più permissivo). Per produzione metti il tuo dominio. |
headersJsonHeaders HTTP extra | key-value | no | — | Headers aggiuntivi oltre a Content-Type/Location/Content-Disposition (gestiti sopra). Es. Cache-Control=no-cache, X-Request-Id={{$run.id}}, ETag="abc123". |
JSON snippet of the node as it appears in the workflow. Values are derived fromdefaultValue and from required parameters.
{
"id": "node-action_webhook_respond-1",
"defId": "action_webhook_respond",
"label": "Webhook: Respond",
"config": {
"respondWith": "json",
"statusPreset": "200 OK",
"binaryContentType": "application/octet-stream",
"contentType": "application/json"
}
}Available now on all FlowForge plans. Try it free without a credit card.
Start freeBrowse all nodes