Sub-Workflow

One workflow can be called from another to create modular workflows, similar to microservices and avoid memory issues.

Create the sub-workflow

  1. Create a new workflow.

  2. Optional: configure which workflows can call the sub-workflow:

    1. Change the This workflow can be called by setting. Refer to Workflow settings for more information on configuring your workflows.

  3. Add the Execute Workflow Trigger node.

  4. Add other nodes as needed to build your sub-workflow functionality.

  5. Save the sub-workflow.

If any mistakes are present within the sub-workflow, it will prevent the parent workflow from being triggered.

Load data into sub-workflow before building

  1. Create the sub-workflow and add the Execute Workflow Trigger.

  2. In the sub-workflow settings, set Save successful production executions to Save.

  3. Skip ahead to setting up the parent workflow, and run it.

  4. Follow the steps to load data from previous executions. You can now pin example data in the trigger node, enabling you to work with real data while configuring the rest of the workflow.

Call the sub-workflow

  1. Open the workflow where you want to call the sub-workflow.

  2. Add the Execute Workflow node.

  3. Set the sub-workflow to be called in the Execute Workflow node. This can be done by choosing the workflow ID, loading a local file, adding JSON as a parameter, or targeting a workflow URL. Your sub-workflow's ID is the alphanumeric string at the end of its URL.

  4. Save your workflow.

When your workflow executes, it will send data to the sub-workflow, and run it.

How data passes between workflows

For example, In Workflow A, there is an Execute Workflow node that triggers Workflow B.

  1. The Execute Workflow node sends data to the Execute Workflow trigger node in Workflow B.

  2. The final node in Workflow B sends data to the Execute Workflow node in Workflow A.

Last updated