Respond

The Respond node sends the reply to whoever started the workflow: a webhook caller that waits for an answer, or a workflow that ran this one with a Run workflow step. Use it when the caller needs an answer from the workflow, for example a form that waits for a validation result, or a service that expects the record id that NocoDB created.

Ask NocoAI

Copy a prompt, paste it into NocoAI in any base, and replace the words in [brackets] with your own.

  • When a webhook arrives, create a [lead] and reply with its [record id]
  • Reply [400] to the webhook when the payload has no [email]
  • Check the [order number] from a webhook and reply with the [Status]

Hold the request open

A webhook caller waits only when the trigger asks it to:

  1. Open the When webhook received trigger.
  2. Turn on Wait for response.
  3. Optional: set Response timeout (seconds), from 1 to 20. The default is 10.

Wait for response turned on in the When webhook received trigger

Add the Respond node anywhere after the trigger. A workflow that starts from the When called by another workflow trigger needs no such setting: its caller always reads the reply. With any other trigger, the Respond node shows a warning and sends nothing.

Configuration

Respond node with a 201 status, a JSON body and two headers

  • Status code: the HTTP status of the reply. The list holds 200, 201, 202, 204, 400, 401, 403, 404, 405, 409, 422, 429, 500 and 503.
  • Body type: JSON, Text or Empty. A 204 reply never carries a body.
  • Body: the reply body, up to 1 MB. It can use the variables of the earlier steps. A JSON body must be valid JSON.
  • Headers: extra response headers. They reach webhook callers only. A calling workflow reads the status code and the body.

A body or a header that holds a sensitive base variable fails the step, so a secret never reaches the caller.

Headers you can set

NocoDB sets the content type itself and accepts these headers:

HeaderNote
Cache-ControlOnly no-store, no-cache, private and must-revalidate.
Location, Retry-After, ETag, Last-Modified, Content-Language
Your own X- headersNot X-Accel-*, X-Sendfile, X-Forwarded-* or the other headers that a proxy or the server owns.

The node flags a header outside this list before the run. If one still reaches a run, it is dropped, and the step logs which one.

What the caller gets

The first Respond step that succeeds sends the reply. A later Respond step in the same run is marked ignored and changes nothing.

A workflow that called this one reads that reply as the body and statusCode of its Run workflow step, with returned set to true. When no Respond step runs, the step reports the run as completed with returned false and an empty body.

For a waiting webhook caller, when no Respond step runs, NocoDB answers by itself as soon as the run ends:

RunReply
Finished200 with { "success": true, "executionId": "..." }
Still running when the timeout passes, or paused at a Delay or Wait Until202 with { "success": true, "executionId": "..." }
Failed or cancelled500 with { "success": false, "executionId": "...", "message": "The workflow failed" }

A timeout stops the waiting, not the run: the workflow carries on in the background.

Output

OutputContent
statusCodeThe status code that was sent
bodyThe body that was sent

Use cases

  • Answer a form or a service with the record that the workflow created
  • Validate a payload and reply 400 when it is wrong
  • Send Location with the link to a new record
  • Return a calculated value to the workflow that called this one

Availability

  • To reply to an HTTP caller, the node needs the When webhook received trigger, which is available on NocoDB Cloud (Plus plan and above) and on licensed on-premise deployments.
  • To return a result to a calling workflow, the node needs the When called by another workflow trigger. The calling Run workflow node is available on NocoDB Cloud (Plus plan and above) and on licensed on-premise deployments.

Last updated on

Latest product updates?See Changelog
Stay in the loop? Follow us onLinkedInLinkedInYouTubeYouTubeXX