When to use it
Use the Response node when you want webhook callers to receive a meaningful response body synchronously, for example:- An API-style webhook that returns the processed result immediately
- A Slack slash command endpoint that needs to reply within its 3-second window
- A webhook call where the sender needs to know the outcome before proceeding
202 Accepted automatically.
Configuration
| Field | Description | Templated |
|---|---|---|
| Label | Display name on the canvas | No |
| Status Code | HTTP status (100–599). Defaults to 200. | No |
| Headers | List of header key-value pairs. Both keys and values support templates. | Yes |
| Body | The response body. JSON or plain text. Supports templates. | Yes |
How it terminates the workflow
The Response node is terminal: it has no outgoing connections. When a workflow run reaches a Response node, it:- Renders all templates (status code, headers, body) against the current workflow state
- Captures the rendered result as the workflow’s output
- Ends the run
Interaction with the trigger’s response mode
The Response node’s behavior depends on the webhook trigger’s Response Mode setting:Sync (WAIT_FOR_COMPLETION)
Spojit holds the HTTP connection until the workflow reaches the Response node, then sends the rendered status/headers/body back to the caller. If the workflow doesn’t finish within the configured Timeout (seconds), Spojit returns202 Accepted with an execution ID; the workflow keeps running, and the Response node’s eventual output is stored on the execution record so it can be retrieved via the execution status endpoint later.
Async (RETURN_IMMEDIATELY)
Spojit returns202 Accepted immediately after dispatch. The Response node still runs: it still terminates the workflow and records its output on the execution, but the output isn’t sent back to the original caller. You can inspect it later via the execution logs.
Examples
Echo request back with a status
Trigger payload:Return an AI-generated answer
Graph:Return different status codes based on validation
Graph:Custom headers
Set headers likeX-Request-Id or Cache-Control to anything, with or without templates:
| Key | Value |
|---|---|
X-Request-Id | {{ input.id }} |
Cache-Control | no-store |
Content-Type | application/json |
Validation
Spojit enforces:- Response nodes must be terminal: they cannot have outgoing connections. Disconnect any edges leaving a Response node before saving.
- You can have multiple Response nodes in a single workflow (e.g., one per branch); there’s no limit.
Tips
- Always set Content-Type explicitly; the default
application/jsonis implied if you leave it off, but being explicit makes webhook docs clearer for integrators. - Keep status codes meaningful (200 for success, 4xx for client errors, 5xx for server errors). Spojit doesn’t enforce this but callers expect it.
- If a field in the body needs to stay a number or object (not a string), use a standalone
{{ ... }}expression; see Type Preservation.