Skip to main content

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​

FieldDescription
statussuccess (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.
bodyThe 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​

FieldDescription
statussuccess or error
bodyThe returned body

What the caller gets​

Callersuccesserror
Execute Workflow nodesuccess branch, result = body, status = success, returned = trueerror branch, result = body, error = the body's error or message text (the workflow returned an error: ...)
AI Agent workflow toolthe body goes back to the modelthe error text goes back to the model as a tool error
AI guardrail workflow connectorthe body is the verdict ({"flagged": true, "reason": "..."} or {"action": "block"})the connector fails and follows its on_error
Manual runthe answer has return: {status, body}; Run now in the console shows it under Returnedsame; 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" }
}
}
}