Webhook: Respond

action_webhook_respond · action · HTTP & Webhook · Available · v2.0.0

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.

⚙️ Configuration parameters

Fields shown in the editor when configuring the node. Generated directly from the NodeDefconfigFields.

FieldTypeRequiredDefaultDescription
respondWith
Tipo di risposta
enum
jsontexthtmlredirectbinaryemptycustom
yesjsonjson = 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).
statusPreset
Codice di stato
enum
200 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)
no200 OKCodice 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).
status
Status personalizzato
numberno
es. 418
Usato SOLO quando "Codice di stato" = Custom. Range 100-599.
body
Body della risposta
expressionno
{"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.
redirectLocation
URL di redirect
expressionno
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.
binaryData
Dati binari (base64)
expressionno
{{$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.
binaryContentType
Content-Type binario
enum
application/pdfapplication/zipimage/pngimage/jpegimage/gifimage/webpimage/svg+xmlaudio/mpegaudio/wavvideo/mp4application/octet-stream
noapplication/octet-streamMIME del file binario. application/octet-stream = "scarica come file generico".
binaryFilename
Nome file (per download)
expressionno
report-{{input.id}}.pdf
Quando impostato, aggiunge header Content-Disposition: attachment; filename="..." così il browser apre il dialogo di salvataggio invece di renderizzare inline.
contentType
Content-Type personalizzato
enum
application/jsontext/html; charset=utf-8text/plain; charset=utf-8application/xmltext/xmltext/csvapplication/javascriptapplication/yamlapplication/octet-stream
noapplication/jsonMIME esplicito del body. Usato solo in modalità Custom (le altre modalità impostano automaticamente il tipo corretto).
customBody
Body custom
expressionno
qualsiasi stringa, supporta {{espressioni}}
Body completamente sotto il tuo controllo. Vuoto = stringa vuota.
corsOrigin
Access-Control-Allow-Origin
stringno
* 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.
headersJson
Headers HTTP extra
key-valuenoHeaders aggiuntivi oltre a Content-Type/Location/Content-Disposition (gestiti sopra). Es. Cache-Control=no-cache, X-Request-Id={{$run.id}}, ETag="abc123".

💡 Configuration example

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"
  }
}

🔗 Related nodes in the same category

Ready to use Webhook: Respond?

Available now on all FlowForge plans. Try it free without a credit card.

Start freeBrowse all nodes