How to get back subworkflow's data back into main workflow

Suppose, initially I call upon a subworkflow, now after sub-workflow is executed, I want subworkflows outcome back into main workflow, how can I do that?

In N8N, when a Subworkflow (also known as the ‘Execute Workflow’ node) is called, the result can be automatically used in the main workflow if configured correctly.

Steps to achieve this:
Use the Execute Workflow node. This node allows you to execute another workflow (subworkflow) within a main workflow. You can specify whether the subworkflow should run while waiting for the result.

Enable the ‘Wait for the workflow to finish’ option. In the Execute Workflow node, activate the option: Wait for the workflow to finish. This allows the main workflow to wait for the subworkflow to finish and receive its output data.

Pass the data back to the main workflow. The data returned by the subworkflow becomes the output of the Execute Workflow node. You can use that data directly as input for subsequent nodes in the main workflow.

Main Flow:
[Start] → [Execute Workflow (subworkflow)] → [Next Node]

1 Like