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.

When to Use

Use Return:

  • At the end of any workflow that is called as a subworkflow — the returned value becomes the result output 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.

Inputs

HandleTypeDescription
inputanyThe value to return. Connect any upstream node's output here.

Outputs

None. Return terminates the execution path and passes the value to the caller.

Settings

None. Return has no configuration — only the input connection matters.

Example

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 }}.

Common Gotchas

  • API Endpoint: If responseMode is use-workflow-response and 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 null as its result.

See Also

On this page