Return Node
What it does
Ends a workflow that starts with the Called by Workflow trigger and hands its answer back to the caller. Type: return_node. It is terminal: no edges leave it, and nodes after it never run.
Inputs
| Field | Description |
|---|---|
status | success (default) or error. Accepts an expression that gives one of the two, for example {{ $json['check'].matched_output == 'valid' ? 'success' : 'error' }}. A literal other value fails validation; an expression that gives another value fails the run. |
body | The result: an object, text or expression. |
In the editor the step is Return in the Respond family. Status offers Success, Error and From an expression (a text field for the expression); Body takes JSON (saved as an object), text or an expression. The step card shows Success, Error or Status from expression. Return is an end step: it has no outputs to connect.
Outputs
| Field | Description |
|---|---|
status | success or error |
body | The returned body |
What the caller gets
| Caller | success | error |
|---|---|---|
| Execute Workflow node | success branch, result = body, status = success, returned = true | error branch, result = body, error = the body's error or message text (the workflow returned an error: ...) |
| AI Agent workflow tool | the body goes back to the model | the error text goes back to the model as a tool error |
| AI guardrail workflow connector | the body is the verdict ({"flagged": true, "reason": "..."} or {"action": "block"}) | the connector fails and follows its on_error |
| Manual run | the answer has return: {status, body}; Run now in the console shows it under Returned | same; the run itself still succeeded |
The run detail in Automation › Executions shows a Returned section for runs that reached a Return node. The return is kept whether or not the run's data is saved (Save run data): everyone who can see the run sees which Return step answered and its status; the body is shown to modifiers only (Show data, audited).
A Called by Workflow workflow that ends without reaching a Return node (for example on a Stop node) answers success with no result; a guardrail connector treats that as an error.
Example
{
"id": "return_1",
"type": "return_node",
"data": {
"inputs": {
"status": "error",
"body": { "error": "customer {{ $json['workflow_trigger_1'].input.customer_id }} not found" }
}
}
}
Related
- Called by Workflow Trigger
- Response Node — the answer of an HTTP trigger workflow
- Node Reference