--- title: Dynamic flows flow logic description: Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/build-workflows/workflow-studio/flow-logic-dynamic-flow.html release: australia product: Workflow Studio classification: workflow-studio topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 6 breadcrumb: [Flow logic, Flows, subflows, and actions reference, Flows, subflows, and actions, Workflow Studio, Build workflows] --- # Dynamic flows flow logic 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. ## Dynamic flow templates 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/getting-started-dynamic-flow-get-flow-outputs.md). ## Inputs The following inputs always appear when you add the Dynamic Flow flow logic to a flow.
| 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 `My dynamic flow not my_dynamic_flow`. 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. |