Skip to main content

Intro

By using Sub Flow in Domo Workflows, you can integrate one workflow into another, allowing for modular and reusable components in your automations. This article guides you through configuring and utilizing subflows effectively.

Required Grants

You can create subflows as long as you have at least an Editor system role or a custom rule with the Create Workflows grant enabled. Learn about system and custom roles.
Note: If you can’t access the Sub Flow feature in Workflows, even with the appropriate grant, contact your Domo account team to enable the feature.

Configure Outputs for Your Subflow

Before using a workflow as a subflow, you must define output parameters. These outputs enable the subflow to pass values back to the parent workflow for use in subsequent steps.
Follow these steps to add outputs:
  1. Open the workflow editor and locate the Variable List on the left panel.
  2. Hover over the variable you want to use as an output.
  3. Select the three-dot menu (…) next to the variable.
  4. Select Output from the menu. The variable appears in the Outputs section, indicating it’s set as an output.
    Note: You can add multiple outputs of any variable type.
Follow these steps to remove outputs:
  1. In the Outputs section, hover over the output variable you want to remove.
  2. Select the trash can icon to delete the output.
    Tip: Removing an output does not affect the original variable—only its role as an output for the Sub flow.

Add a Subflow to Your Workflow

After configuring your outputs, you can integrate the Sub flow into your main workflow.
Note: The subflow must be deployed before it can be used. A subflow must also be deployed to use it in a parent workflow.
Follow these steps to add a subflow:
  1. Add or edit a step in your workflow canvas.
  2. Open the Action Menu and select Sub Flow.
  3. In the configuration panel, select Add Sub Flow. The subflow selection modal opens.
  4. Use the dropdown or search bar to find the subflow you want to use. The list only shows deployed subflows that are accessible to you.
  5. Select your desired workflow. Details about your workflow display, such as:
  • Description
  • Inputs and Outputs
  • Workflow preview
  1. Select Add Sub Flow to insert it into your workflow.

Manage Your Assigned Subflow

After you’ve added a subflow, you can manage it—whether that means changing it, viewing its details, or testing it. Follow these steps to manage your subflow:
  1. In the configuration panel, locate the Sub Flow Designation Tile.
  2. Select the three-dot menu (…) on the tile to access options.
  3. You can:
  • Change the selected subflow.
  • View the subflow details.
  • Remove the subflow.
  • Test-run the subflow.

Choose an Execution Mode for Your Subflow

When configuring the subflow, you need to decide how it behaves when called from the parent workflow.
There are two execution modes: Run and Wait (default) — The parent workflow pauses until the subflow finishes. This mode is useful when the output from the Sub flow is needed for subsequent steps. Run and Continue — The parent workflow proceeds immediately to the next step without waiting for the subflow to finish. No output is captured in this mode.
Tip: The Run and Wait mode is ideal when subsequent steps depend on the Sub flow’s output.
Follow these steps to choose an execution mode:
  1. In the Sub Flow Configuration Panel, find the two radio buttons for execution modes:
  2. Run and Wait
  3. Run and Continue
  4. Select the execution mode based on whether you require the subflow’s results before proceeding with the parent workflow.

Map Inputs and Outputs

To ensure your data flows correctly between the parent workflow and the subflow, you must map the inputs and outputs.
Tip: Ensure that all variable types are compatible when mapping inputs and outputs.
Follow these steps to map inputs:
  1. Map the required input variables from the parent workflow to the subflow’s input parameters.
  2. Ensure that the types of these input variables match or are compatible with the Sub flow’s expected inputs.
Follow these steps to map outputs:
  1. Map the output variables from the Sub flow to variables in the parent workflow to capture the results.
  2. If needed, create new variables in the parent workflow to receive these outputs.

Map Subflow Metadata

At the bottom of the subflow configuration panel, you can find a section for subflow metadata. This section lets you map additional variables related to the subflow’s execution. These fields are optional, and you can leave them unassigned if you don’t need to capture any metadata.