---
sourceDocument: Australia Build workflows
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/build-workflows

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Dynamic flows flow logic

# Dynamic flows flow logic {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Dynamic Flows Flow Logic

Dynamic Flow flow logic enables users to identify and execute a specific flow or subflow at runtime based on provided data.
This feature is particularly useful when managing multiple flows with similar names or purposes, allowing for efficient flow selection during execution.
Show full answer Show less  

## Key Features

* **Dynamic Flow Creation:** Flow designers can create and publish templates for flows or subflows, ensuring inputs align with dynamically called flows.
* **Flow Template Inputs:** Inputs must match in label and name between the dynamic flow and the template to ensure successful execution.
* **Dynamic Naming:** Users can generate flow or subflow names dynamically by concatenating strings with data pill values.
* **Completion Wait Option:** There is an option to pause the parent flow until the dynamic flow completes execution.
* **Context Outputs:** Dynamic Flow outputs are accessible as Record type data pills, allowing users to derive runtime values easily.

## Key Outcomes

By leveraging Dynamic Flow, customers can streamline their process management, ensuring that similar subflows are effectively compartmentalized and executed based on real-time data. Correct input matching and context management are critical for optimal functionality, enabling a smooth execution of workflows. This capability enhances operational efficiency and minimizes errors in flow execution.  
Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows.

The Dynamic Flow flow logic calls a flow or subflow during runtime by using the data that you
specify during the flow design. You can use Dynamic Flow to select which flow to run when
multiple flows have similar names or purposes.  
To use Dynamic Flow, the flow designer does the following:

1. Creates and publishes a flow or subflow to use as a template.
2. Adds Dynamic Flow to a parent flow.
3. Selects the flow template for Dynamic Flow.
4. Enters the flow name for Dynamic Flow.
5. Enters the required inputs specified by the flow template.
{#flow-logic-dynamic-flow__ol_j2d_jwt_mjb}

## Dynamic flow templates {#flow-logic-dynamic-flow__section_tlx_1xt_mjb}

The template for Dynamic Flow can be a flow or a subflow. The template's inputs must match the
inputs of any flow or subflow that you call dynamically. An input matches when it has the same
Label and Name field values in each flow or
subflow.

After you build a template, consider copying it to create similarly named and similarly
performing flows or subflows. Make sure that you name each flow or subflow with a standard
naming convention that can be generated by Dynamic Flow. For more information on creating a
template for Dynamic Flow, see [Getting started with Dynamic
Flow and Get Flow Outputs](https://servicenow-prod.fluidtopics.net/YDarrBoqNt5DO~KRcnIHxw#getting-started-dynamic-flow-get-flow-outputs "Create a sample flow that dynamically calls subflows for provisioning cloud services.").

## Inputs {#flow-logic-dynamic-flow__section_vlc_xyt_y3b}

The following inputs always appear when you add the Dynamic Flow flow logic to a flow.  
{#flow-logic-dynamic-flow__table_zmj_tzt_y3b__entry__2}

| Input | Description |
|-|-|
| Flow Template | Template whose inputs the dynamic flow copies and displays. The inputs for the template must match the inputs of the subflow that you want to run. |
| Flow | Name or Sys ID of the flow or subflow that you want to run. Flow names must be the display name not the flow internal name. For example, enter the name <kbd class="ph userinput">My dynamic flow not my_dynamic_flow</kbd>. Generate a flow or subflow name dynamically by entering a string and concatenating it with data pill values. You can call a flow or subflow that is associated with another application scope by entering a scope-name.flow-name format. The user running the flow or subflow must have access to the application scopes that you specify. If you do not specify an application scope, the dynamic flow runs in the parent flow's scope. Note: If the system can't find the flow or subflow, it skips the Dynamic Flow flow logic step and logs an error message. |
| Wait for completion | Option to force the parent flow to wait until the dynamic flow finishes running before proceeding with the next action. |
[ ]

{#flow-logic-dynamic-flow__table_zmj_tzt_y3b}  
Note:  
You see more inherited inputs after you select a Flow Template.

## Get flow outputs {#flow-logic-dynamic-flow__section_x1v_zkt_1jb}

Dynamic Flow outputs appear in the data panel as Record type data pills that are named as Context. You can use these flow contexts to derive the runtime values for dynamic flow outputs with the Get Flow Outputs flow logic. To use Get Flow Outputs, the flow designer does the following:

1. Adds a Dynamic Flow to a flow.
2. Adds Get Flow Outputs after the dynamic flow.
3. Specifies the value for the Context input by clicking the data pill picker (![Data pill picker]()) and selecting Dynamic FlowContext.
{#flow-logic-dynamic-flow__ol_d1t_cc5_mjb}

For more information on using Get Flow Outputs, see [Getting started with Dynamic
Flow and Get Flow Outputs](https://servicenow-prod.fluidtopics.net/YDarrBoqNt5DO~KRcnIHxw#getting-started-dynamic-flow-get-flow-outputs "Create a sample flow that dynamically calls subflows for provisioning cloud services.").

## General guidelines {#flow-logic-dynamic-flow__id_vgy_jtb_ptb}

Use dynamic flows if you have multiple subflows with similar functionality
:   Dynamic flows let you compartmentalize your processes by applying a template to handle the inputs of multiple similar subflows. Compartmentalization lets you distinguish between subflows that perform similar functions,
    such as subflows for [IntegrationHub](https://www.servicenow.com/docs/access?context=integrationhub&version=australia&pubname=australia-integrate-applications&ft:locale=en-US) spokes.

Ensure dynamically called subflow inputs match template flow inputs
:   The system throws an error and the main flow can't run properly when the inputs of a dynamic flow and flow template don't match.

Use the correct context when getting flow outputs
:   A context record uniquely identifies the flow run. If you run a dynamic flow multiple times, there are multiple context records to choose from.
    When you use dynamic flow multiple times within a flow, make sure to pick the right context record from the right run each time you get flow
    outputs.
**Related concepts**   

* [Assign subflow outputs flow logic](https://servicenow-prod.fluidtopics.net/Vi2xufmkKFPMynJkLOlALA "Specify the data the subflow returns when it completes running. Use subflow output as data for a parent flow or as input for another process.")
* [Call a workflow flow logic](https://servicenow-prod.fluidtopics.net/XDLqoShzg9~AHEcc9WiB4A "Run a published and active workflow from your flow. You can use the flow data as a workflow input. For example, you can specify the current record as a workflow input.")
* [Do the following until flow logic](https://servicenow-prod.fluidtopics.net/QAQc64OsyoACdx7Me3riLA "Apply one or more actions repeatedly until an end condition is met. You can use the flow data to specify the end conditions.")
* [Do the following in parallel flow logic](https://servicenow-prod.fluidtopics.net/eILn02zBZvbi3Tn7n7lqLA "Run actions and subflows in separate paths within an isolated flow logic block.")
* [End Flow flow logic](https://servicenow-prod.fluidtopics.net/NAyoEtyTqpGliQlDlcqNCg "Stop running the current flow. Use End Flow within a branch of the flow to specify an exit condition. For example, end the flow when it reaches a specific If flow logic block.")
* [For Each flow logic](https://servicenow-prod.fluidtopics.net/m2Jd4tAy1wj9Vfu6zJIqGQ "Apply one or more actions to each record in a list of records.")
* [If flow logic](https://servicenow-prod.fluidtopics.net/nR06QTqfpGjIp8_whZe0CQ "Selectively apply one or more actions only when a list of conditions is met.")
* [Make a decision flow logic](https://servicenow-prod.fluidtopics.net/kj1wegOGweMm50e~aPx~aA "You can use the decision table branching logic in situations where multiple conditional paths are required, as an alternative to nested If, Else If, or Else flow logic. For example, if you want to determine what kind of car insurance you need, you can add inputs such as your age, accident history, and car model to the decision table to determine a level of insurance coverage. This logic can save you time and present a more readable format than nested if conditions or switch case statements.")
* [Set Flow Variables flow logic](https://servicenow-prod.fluidtopics.net/taLpFCTeLjMl12m~qAkCGw "Assign a value to one or more flow variables, which store flow data as data pills. Access flow variable values by referring to their data pill.")
* [Try flow logic](https://servicenow-prod.fluidtopics.net/2anCAJO7Iy6D_v~Y9CMVeg "Allow a flow to continue running when an error occurs within a flow logic block. Run a sequence of actions in response to errors within the flow logic block.")
* [Wait for a duration flow logic](https://servicenow-prod.fluidtopics.net/jta33j7A9dgcVulpsFKEdg "Use this flow logic to give your users time to act during automated processes or to wait for a specific date and time to complete actions.")  
**Related reference**   

* [Append to Flow Variables flow logic](https://servicenow-prod.fluidtopics.net/QdizsC8_AAj6fxqxNs3ynQ "Append a value to one or more array of objects flow variables. Use flow data to generate values.")
* [Exit Loop flow logic](https://servicenow-prod.fluidtopics.net/wNRkIzhET_BU_tHJZo0sww "Exit from a flow logic loop when the conditions of an If flow logic are met. Continue running the flow from the next step after the flow logic loop. This flow logic is also known as break.")
* [Get Flow Outputs flow logic](https://servicenow-prod.fluidtopics.net/vKzFDepPhnY3B2SF7MnreA "Retrieve output values generated by dynamic flows or subflows.")
* [Go back to flow logic](https://servicenow-prod.fluidtopics.net/ZBe0On6wxNGHSUgBMlBOTA "Return to a prior step in the flow to repeat a sequence of actions.")
* [Skip Iteration flow logic](https://servicenow-prod.fluidtopics.net/hAlsZiuAyM0sbpeo32QQ4w "Skip the current iteration of a flow logic loop when the conditions of an If flow logic are met. Continue running the flow logic loop with the next item in the list. This flow logic is also known as continue.")

*[\>]: and then


