Return
Returns a value from the current workflow. Used in two scenarios: sending a synchronous HTTP response from an API Endpoint workflow, or returning a result to the parent from a Subworkflow call.
Use Return:
- At the end of any workflow that is called as a subworkflow — the returned value becomes the
resultoutput of the Subworkflow node in the parent workflow - At the end of an API Endpoint workflow with
responseMode: use-workflow-response— the returned value becomes the HTTP response body
You do not need Return in webhook workflows unless you explicitly need to send a synchronous response.
| Handle | Type | Description |
|---|---|---|
input | any | The value to return. Connect any upstream node's output here. |
None. Return terminates the execution path and passes the value to the caller.
None. Return has no configuration — only the input connection matters.
API Endpoint workflow that looks up a user and returns their profile as a JSON response:
API Endpoint (POST) → HTTP Request (fetch user) → Transform (shape response) → Return
The Transform node builds:
{
"id": "{{ http_request.data.id }}",
"email": "{{ http_request.data.email }}",
"plan": "{{ http_request.data.plan }}"
}
The caller receives this JSON as the HTTP response body with status 200.
Subworkflow that validates a user ID and returns their data:
Manual Trigger → HTTP Request (validate ID) → If ({{ http_request.status }} == 200)
→ true: Return ({{ http_request.data }})
→ false: Return ({ "error": "not found" })
The parent workflow accesses the result as {{ subworkflow.result }}.
- API Endpoint: If
responseModeisuse-workflow-responseand no Return node fires before the timeout, the caller's connection is dropped and they receive a timeout error. - Multiple Return nodes: You can have more than one Return node in a workflow (e.g., one on the true branch and one on the false branch of an If node). The first Return that executes ends the workflow.
- Subworkflow: If a subworkflow does not reach a Return node, the Subworkflow node in the parent receives
nullas its result.
- API Endpoint — configure synchronous response mode
- Subworkflow — call a workflow and use its return value
- Manual Trigger — required entry point for callable workflows
