---
sourceDocument: Australia Build workflows
sourceDocumentLink: https://www.servicenow.com/docs/r/build-workflows

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Build subflows

# Building subflows {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 8 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 Building subflows

Workflow Studio is the default ServiceNow AI Platform tool for creating subflows, which are reusable sets of operations without triggers.
Subflows are designed to be called from other flows or scripts, enabling modular, efficient process automation.
They consist of properties, inputs, outputs, a sequence of actions and logic, and the data they handle.
Show full answer Show less  

## Subflow Properties and Configuration

Subflow properties include the name, application scope (set only at creation), category, description, annotations, roles, and status. Inputs define data required when the subflow starts and appear as configurable options in Workflow Studio. Outputs define data returned to the parent flow after execution, with values assigned conditionally or directly within the subflow logic.

Inputs support advanced configuration such as hints, default values, and choice lists to guide flow designers. Outputs use the "Assign Subflow Output" logic and can vary depending on runtime conditions.

## Actions and Flow Logic

Within subflows, actions automate platform features like record creation without coding. Flow logic options include:

* **For Each:** Apply actions to each record in a list, supporting nested loops with caution to avoid performance issues.
* **If:** Conditional execution with support for Else and Else If branches.
* **Assign Subflow Outputs:** Assign output variables based on flow data and conditions.

## Execution and Testing

Subflow execution details are visible inline within parent flow executions and as separate records. Subflows can be tested independently by defining inputs, though testing should occur on non-production instances due to potential data changes.

## Best Practices and Guidelines

* Use subflows to reuse business logic across multiple flows and improve readability, especially when flows exceed 25 actions.
* Limit subflows to 20 inputs to maintain performance.
* Pass inputs and outputs explicitly to enable flexible data handling between flows and subflows.
* Use parallel subflows for interrelated outputs; otherwise, triggering multiple flows may be simpler.
* Employ dynamic flows to manage multiple similar subflows efficiently.
* Leverage subflows to overcome error-handling limits and automate corrective actions.

## Additional Features

* Create subflows from existing flows or via generative AI with Now Assist.
* Develop conversational subflow skills for user interaction.
* Copy, publish, and manage subflow versions and history for lifecycle control.
* Convert sequences of flow items into subflows to modularize processes.
* Use decision tables within subflows to manage conditional logic conveniently.
* Generate summaries and test conversational subflows before production deployment.

## Roles and Access

Access to subflows requires the **flowdesigner** or **admin** role, ensuring that only authorized users can create and modify subflows.  
Workflow Studio is the default ServiceNow AI Platform process automation builder used to create subflows. Workflow Studio replaces the Workflow Editor.

Unlike flows, subflows lack a trigger. Use a subflow when:  
* You only want to start a flow by calling it from another flow or script.
* You want to create a set of reusable operations for use in multiple flows.
* You want to specify the inputs available to the subflow when it starts.
* You want to specify the outputs available to the parent flow after the subflow ends.
{#subflows__ul_lvm_rbk_mcb}

All subflows consist of properties, one or more inputs, one or more outputs, a sequence of actions and flow logic, and the data collected or created.

## Subflow properties {#subflows__section_xyp_h5z_mbb}

The subflow properties specify the subflow name, application, category, description, in-flow
annotation, roles, and status. Flow designers can update the subflow name, category,
description, in-flow annotation, and roles at any time, but can only set the application
during subflow creation. The subflow status is set when you save or publish a subflow.

## Subflow inputs {#subflows__section_rql_zsc_mcb}

Subflow inputs specify the data available to the subflow when it starts. Each input you define for a subflow becomes a configuration option in the Workflow Studio interface. To use the subflow in a flow, you must define a value for each mandatory input. The more inputs a subflow has, the more data you must define and the more familiar you must be with the underlying data model to use the subflow effectively.

Inputs provide advanced options based on their data type. All inputs have advanced options to add a hint or provide a default value. Use advanced options to guide flow designers through adding and configuring a subflow to a flow. For example, create a choice input to provide flow designers with a pre-defined list of configuration options to choose from. For more information about the configuration options available to particular data types, see [field types](https://www.servicenow.com/docs/access?context=r_FieldTypes&version=australia&pubname=australia-platform-administration&ft:locale=en-US).

## Subflow outputs {#subflows__section_gbg_wbk_mcb}

Subflow outputs specify the data available to the parent flow after the subflow completes. Subflow outputs are defined as variables with a name and data type. Subflow designers assign values to an output using the Assign Subflow Output flow logic. Output values can be based on the subflow logic conditions, action results, or a manually set value. For example, an output may have one value when a condition is met and another value when a condition is not met. During runtime, the value of the output is determined by the condition that is met.

Consider the following example of a subflow with two conditions that both result in a value
for a single output variable. The value of the variable depends on which condition is met
during runtime.  

Outputs
:   \[Manager ID\] \[String\]

Actions
:
    * 1 Look Up \[User\] Record where (Created on Today)
    * 2 If (\[1-\>User Record-\>Title\] contains Manager) then, Assign Subflow Outputs \[Manager ID\] to \[1-\>User Record-\>User ID\]
    * 3 Else, Assign Subflow Outputs \[Manager ID\] to \[1-\>User Record-\>Manager-\>User ID\]
    {#subflows__ul_fcn_pvy_mcb}

In this case, if the user's title contains "Manager" then the user ID is assigned as
output. Otherwise, the subflow looks up the user's manager and assigns the user ID of the
manager as output.

Workflow Studio allows you to define a
value for the same variable multiple times. However, if a variable is given two or more
possible values without conditional logic, only the last value defined in the subflow is
applied to the output at runtime.  

Outputs

:   \[Manager ID\] \[String\].

Actions
:
    * 1 Look Up \[User\] Record where (Created on Today)
    * 2 Assign Subflow Outputs \[Manager ID\] to \[1-\>User Record-\>User ID\]
    * 3 Assign Subflow Outputs \[Manager ID\] to \[1-\>User Record-\>Manager-\>User ID\]
    {#subflows__ul_vgl_w4z_mcb}

In this example, action three overwrites the value of action two and \[1-\>User Record-\>Manager-\>User ID\] is applied to the \[Manager ID\] output at runtime
because it was the last value defined. Typically, subflows should only include multiple
values for one variable if conditional flow logic is used.

## Subflow execution details {#subflows__section_wqy_psp_rnb}

Process analysts can view subflow execution details from multiple locations.

Parent flow execution details
:   Workflow Studio displays subflow execution details within the parent flow
    execution details. The parent flow execution details list each subflow as inline
    elements. You can expand a subflow step to see its execution details.

Subflow execution details
:   The system generates flow execution details for each subflow run. View subflow
    execution details directly from the list of flow executions.

## Actions {#subflows__section_azr_1tc_mcb}

Within Actions, flow designers can add actions, flow logic, flows,
or other subflows.

An action is a reusable operation that enables process analysts to automate ServiceNow AI Platform features without having to write code. For example, the Create Record action allows process analysts to generate records in a particular table with particular values when certain conditions occur. ServiceNow core actions like Create Record require some familiarity with ServiceNow AI Platform tables and fields. Action designers can create application-specific actions to pre-set configuration details. For example, creating a Create Incident Task action ensures that the process analyst uses the correct table and field configuration each time the action is used. You can add application-specific actions by activating the associated spoke.

## Flow logic {#subflows__section_hll_nvz_mbb}

Subflows can contain flow logic to specify conditional or repeated actions, or
to assign output variables to subflow data. The system provides these flow logic
options.  
{#subflows__table_lw2_zxz_mbb__entry__2}

| Flow logic | Description |
|-|-|
| For Each | Applies actions to each record in a list of records. Flow designers must specify the list of records from the subflow data. Note: You can nest a For Each flow logic block inside of another flow logic block to repeat an action over a series of records. However, avoid nested For Each loops that process many records. Nested loops may cause the flow to run until it is stopped by the flow transaction quota rule, which prevents flows from running longer than an hour. For more information about transaction quotas, see [Transaction quotas](https://www.servicenow.com/docs/access?context=c_TransactionQuotas&version=australia&pubname=australia-platform-administration&ft:locale=en-US). |
| If | Applies actions when a list of conditions is met. Flow designers can specify the conditions with subflow data. Once an If condition is added, you can add an Else or Else If flow logic option to define behavior when conditions are not met. |
| Assign Subflow Outputs | Assigns an output variable to subflow data. Only outputs defined in Inputs \& Outputs can be assigned a value. Assigning outputs enables you to assign a different output variable for each logical path in the subflow. |
[Table 1. Available flow logic]

{#subflows__table_lw2_zxz_mbb}

## More Actions {#subflows__section_zrk_t5k_4fb}

Click the More Actions (![More Actions icon]()) button to access additional options for the subflow.

Copy action
:   Create a copy of the open subflow in an application you specify.

Configurations
:   Enable or disable the Show draft actions, Show triggered flows, Show store spokes, and
    Show inline script toggle options.

Code Snippet
:   Generate a code snippet for the action.

Manage security
:   Enable or disable the Callable by Client API option.

Manage natural language title
:   Create or edit a subflow title with styled or dynamic text. For more information, see
    [Manage natural language
    titles](https://www.servicenow.com/docs/qjYo__kYFXSQd8PkFsBl5A "Change the default title for a flow, subflow, or action by adding styled and dynamic text.").

## Testing subflows {#subflows__section_bcn_3sx_lcb}

You can test a subflow alone, or when added to a flow. When testing a subflow alone, you must define the inputs that the subflow uses in its actions. Because a subflow does not have a trigger, testing a subflow runs the actions using the defined input values.  
Note:  
Because testing a subflow creates or changes records on the instance, flow designers should always test subflows on a non-production instance containing relevant demonstration data.

## Roles {#subflows__section_f1b_rvz_mbb}

To access subflows, a user must have the flow_designer or admin role.

## General guidelines {#subflows__id_obq_bxb_ptb}

General guidelines that apply to [flows](https://www.servicenow.com/docs/rdjXjcHvTmif13bwuZtdtg "Workflow Studio is the default ServiceNow AI Platform process automation builder used to create flows. Workflow Studio replaces the Workflow Editor.") also apply to subflows.

Reasons to use a subflow instead of a flow include:

Reuse business logic
:   Create a set of reusable operations as a subflow that can then be used in multiple flows.

Reuse business logic{#subflows__reuse-business-logic}
:   Create a set of reusable operations as a subflow that can then be used in multiple flows.

Configure different input values for each call
:   Configure a subflow's input values differently each time you call it. For example, design a subflow to accept different record types as an input run. Reuse this generic record subflow instead of writing a specific flow
    for each record type.

Improve performance and readability of large flows

:   Use subflows when a flow exceeds 25 actions. 50 is the maximum number of actions specified by the sn_flow_designer.max_actions system property, but limit a flow to 25 actions for the best performance.

Limit subflows to 20 inputs
:   The more inputs your subflow has, the more resources it takes to open and run it. Processing more than 20 inputs risks the subflow being slow to open and run.

Pass inputs and outputs with subflows
:   Call subflows if you want to pass inputs and outputs. Use subflows if you want to specify the inputs available to a subflow when it starts, or if you want to specify the outputs available to the parent flow after a
    subflow ends.

Trigger multiple flows on a single event vs. using parallel subflows
:
    * Use parallel subflows if there are interrelated outputs or if some action must be taken when all are available. If not, then it's simpler to trigger multiple flows.
    * To configure parallel subflows, launch each subflow without a wait and then use wait for condition to wait for each subflow to be terminal (complete, error, canceled)
    {#subflows__ul_c2s_c2f_ntb}

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.

Avoid the 10-item limit in the error-handling-process
:   Rather than force your error-handling-process to fit within a 10-item limit, call subflows, which can contain many more items. You can also use the subflow outputs to trigger automation in other flows.

Take corrective actions
:   Rather than recreate the same sequence of actions in multiple flows, create reusable subflows to correct errors to your record data. When a flow error leaves your record data in an undesired state, use subflows to correct
    these records. You can use the error handler to identify such record data as a subflow output.
* **[Create a subflow in Workflow Studio](https://www.servicenow.com/docs/7jAqeN4sVKi_m~WDCkNaFQ)**   
  Reuse an entire flow's content as a subflow. Define the input data the subflow uses and the output data it generates. Call subflows from other flows or script.
* **[Create a subflow with Now Assist](https://www.servicenow.com/docs/qUMeoa614kWMzH2Z5FtEiQ)**   
  Use generative AI to create a subflow from text directions and images.
* **[Create conversational subflow skill](https://www.servicenow.com/docs/iyw7J19IV3IjB9vsBNaXHA)**   
  Create a skill for the conversational subflow and make the skill available for users in a conversation. You can have multiple skills for the same subflow.
* **[Configure subflow conversational settings](https://www.servicenow.com/docs/C1jGcpFq~GKpD9nbvq605Q)**   
  Configure conversation settings to make a subflow available to conversational interfaces.
* **[Configure LLM to generate descriptions for conversational subflows](https://www.servicenow.com/docs/vH0Zz6XchQbD~h6JKWuncg)**   
  Choose which LLM you want to use by default to generate descriptions for inputs, outputs, and skills for conversational subflows.
* **[Copy a subflow](https://www.servicenow.com/docs/qmctFAT5jF1IXNm7nGzVbA)**   
  Copy a subflow to give it a new name and move it to another application scope.
* **[Create a decision table in a subflow](https://www.servicenow.com/docs/oEE4DCeJZjXtU6PjIIfz0A)**   
  Create a decision table structure while you author your flow in Workflow Studio. Use data from the subflow to create inputs, conditions, and results for the decision table, all in a convenient modal.
* **[Convert items to subflow](https://www.servicenow.com/docs/wenY7P60hfiAmBpbICvCyg)**   
  Convert consecutive items of a flow into a new subflow that preserves data pill references between the converted items. Update the original flow to replace the converted items with a call to the new subflow.
* **[Create a template value input](https://www.servicenow.com/docs/wQHQA5k8M7qN~1ggzzGBTw)**   
  Enable flow authors to set field values for a record being created or updated. Use a template value input to set different field values each time you add an action or subflow to a flow.
* **[Get started with Dynamic Flow and Get Flow Outputs](https://www.servicenow.com/docs/YDarrBoqNt5DO~KRcnIHxw#getting-started-dynamic-flow-get-flow-outputs)**   
  Create a sample flow that dynamically calls subflows for provisioning cloud services.
* **[Publish a subflow](https://www.servicenow.com/docs/GFVD24V8Gmq2mQOp53GZ9A)**   
  Publish a subflow to make it available to other users and to add it to activated flows.
* **[Summarize a subflow](https://www.servicenow.com/docs/jvB5v9_juXmn_1KF5bnvaA)**   
  Generate a summary of a subflow with ServiceNow Otto for Creator.
* **[Subflow history](https://www.servicenow.com/docs/Mbzoqki3xs0izQai8hQ2VQ)**   
  View and manage the history of a subflow. See past configurations of a subflow to copy, restore, or remove them.
* **[Test a subflow](https://www.servicenow.com/docs/vljX8mFUCDHPLsblDU8nEA)**   
  You can test a subflow alone, or when added to a flow. When testing a subflow alone, you must define the inputs that the subflow uses in its actions. Because a subflow does not have a trigger, testing a subflow runs the actions using the defined input values. Unless updated, subsequent tests use the same inputs defined in the initial test run.
* **[Test conversational subflow](https://www.servicenow.com/docs/NOQk_cTiWCV5XvbBXRHl5A)**   
  Test a conversational subflow to verify it responds correctly to user inputs and performs the expected operations before deploying it in production.

