---
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


---

# Build flows

# Building flows {#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 flows

Workflow Studio is the default ServiceNow AI Platform tool for building flows, replacing the Workflow Editor.
Flows consist of a trigger, actions, and flow logic that automate processes.
Users can create, copy, and test flows, managing data through a data panel and flow variables.
Building flows requires familiarity with the underlying tables and fields of the applications or processes involved.
Show full answer Show less  

## Key Features

* **Flow Composition and Limits:** Flows have a default maximum of 50 actions, configurable via system properties with consideration for instance performance.
* **More Actions Menu:** Provides options to manage stages, catalog variables, flow variables, copy flows, flow preferences, security settings, custom titles, and code snippets.
* **Testing and Execution Details:** Flows can be tested within Workflow Studio using specific records, with execution details and logs generated to verify behavior. Testing is recommended in non-production instances.
* **Flow Properties:** Include name, protection level, application scope, description, and execution context (Run As user and roles), allowing flows to run as the user initiating the session or as a system user.
* **Roles and Permissions:** Access to flows requires flowdesigner or admin roles. Flow roles can be assigned to preserve user context and grant necessary data access without elevating user permissions.
* **Flow Design Guidelines:** Emphasize creating short, modular, reusable flows. Avoid conflicting logic by deactivating legacy automations before replacing them with flows. Use subflows for reusable operations and schedule or flow logic for timing control.
* **Performance Best Practices:** Limit loop iterations and record lookups to prevent memory issues; avoid using gs.sleep(); execute flows in the background to improve UI responsiveness; minimize instance to MID Server context switching.
* **Flow Maintenance:** Include syscomplexobject records in update sets for complex data schemas, avoid deploying newer release flows on older instances, and turn off flow reporting in production to conserve memory.
* **Advanced Features:** Flow error handling, flow execution analysis, AI-generated flow recommendations and summarization, flow template building for citizen developers, inline scripting for data manipulation, and automatic saving of work.

## Practical Guidance for ServiceNow Customers

* Use Workflow Studio to build, copy, and test flows efficiently, ensuring you run tests in safe environments to protect production data.
* Configure flow properties to control execution context and security, tailoring flows to business requirements while preserving user information.
* Adopt best practices for designing flows that are modular, reusable, and performance-optimized to avoid memory overloads and execution delays.
* Leverage flow roles to manage permissions cleanly and avoid running flows with excessive privileges.
* Utilize advanced capabilities like AI-driven flow recommendations and summarization to accelerate flow development and understand flow behavior.
* Manage flow versions and history to maintain control over changes and restore previous states if needed.
* Include all necessary complex objects in update sets when moving flows between instances to avoid execution issues.
* Ensure instance release versions are aligned before deploying flows to avoid compatibility problems.  
Workflow Studio is the default ServiceNow AI Platform process automation builder used to create flows. Workflow Studio replaces the Workflow Editor.

Flows consist of a trigger and a sequence of actions and flow logic. When you add actions and flow logic to a flow, the data collected or created appears in the data panel, which you can use in other actions and flow logic.

Building and managing flows requires that you have some familiarity with the ServiceNow AI Platform tables and fields that the application or process uses. Process analysts can create flows using available actions and flow logic, or they can copy an existing flow to use it as a template.

## Action limit {#flows__section_ydv_jpw_lcb}

By default, flows can have no more than 50 actions. To change the default behavior, increase the value of the sn_flow_designer.max_actions system property. However, consider the performance impact that a large flow may have on your instance.

## Missing actions {#flows__section_zn3_fny_llb}

If an administrator added your flow from an update set, you might have some missing actions
in your flow. This normally happens when your instance doesn't have the appropriate Integration Hub spokes installed. For more information on how to install the
spokes you need to get these actions to appear, see [spokes](https://servicenow-prod.fluidtopics.net/A18mXhQDecZahxHnQz~jyA "Add application-specific content to Workflow Studio by installing spokes.").

## More Actions menu {#flows__section_zrk_t5k_4fb}

Select the More Actions icon (![More Actions icon]()) to access additional options for your flow.

Stages
:   Access the stages for a flow.

Manage flow catalog variables
:   Manage the catalog variables available to Service Catalog-triggered-flows.

Flow Variables
:   Create flow variables to set and retrieve data throughout a flow.

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

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

Create code snippet
:   Generate a code snippet to call a specific flow, subflow, or action.

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

Change default flow title
:   Change the default title for your flow by adding styled or dynamic text. For more
    information, see [Create a
    natural language title](https://servicenow-prod.fluidtopics.net/qjYo__kYFXSQd8PkFsBl5A "Change the default title for a flow, subflow, or action by adding styled and dynamic text.").

## Testing flows {#flows__section_twv_dqj_4bb}

You can test a flow directly from the Workflow Studio interface. Each test
runs your flow as if the trigger conditions were met. If the flow has record trigger, you
can specify the record to use for your test. After the flow runs, use the flow execution
details to verify that your flow is running properly.  
Important:  
Always run tests on a non-production instance where flow record changes cannot interfere with your production data.

## Flow execution details {#flows__section_tp3_wnp_2bb}

Each time you test a flow, the system generates flow execution records, log messages, and
reports. The flow context is a related record containing the current state and runtime
values of the flow. The system generates a context record each time a flow is run.

Optionally, you can configure the system to generate execution details anytime a flow is
run, not just during testing. For more information, see [Activate flow reporting](https://servicenow-prod.fluidtopics.net/0Wvrk7uR2kF3HtdQTZpAVg#enable-flow-reporting "Choose whether to generate execution details for all flows and actions run, just for individual flows and actions, or just when you test a flow or action. Specify the level of detail the execution details contain.").

## Flow properties {#flows__section_xyp_h5z_mbb}

The flow properties contain information about your flow. In the main header, select
Properties to view or edit your flow's properties.
{#flows__table_qpc_hyv_5fb__entry__2}

| Property | Description |
|-|-|
| Name | Enter a unique name for the flow |
| Protection | Choose whether the flow is read only by choosing from None or Read-only |
| Application | Select an application for the flow. This property is set when creating the flow and cannot be changed afterwards. |
| Description | Enter a description of the flow. |
| Run As | Option to specify the user that runs the flow. You can select the system user or the user who initiates the session. Select the user who initiates the session option when updates should come from the user who triggered the flow. For example, use this option when you want the incident record comments to come from the user who started the flow. Settings for the Run as option in a flow don't apply to child subflows. To create a flow that can run with a personal OAuth token, select the user who initiates the session option. If the user who is running the flow has a personal OAuth token, the flow runs with that token. For more information about creating a personal OAuth token, see [OAuth 2.0 credentials](https://www.servicenow.com/docs/access?context=oauth-2-credentials&version=australia&pubname=australia-platform-security&ft:locale=en-US). |
| Run with role(s) | Roles that the flow runs with. This option is only available when Run as is set to user who initiates the session. |
[ ]

{#flows__table_qpc_hyv_5fb}

## Printing flows {#flows__section_iny_1nt_qlb}

Workflow Studio supports multipage printing for flows, subflows, actions, and
flow execution details. For a list of supported browsers, see [Browser support](https://www.servicenow.com/docs/access?context=browser-support&version=australia&pubname=australia-platform-user-interface&ft:locale=en-US).

## Roles {#flows__section_f1b_rvz_mbb}

To access Flows, a user must have the flow_designer or admin roles.

## General guidelines {#flows__id_it5_hyb_ptb}

Flows should be short, modular, reusable collections of work. If they take more than an hour to execute, they're probably too long and can be more efficient.

Any general guidelines that apply to flows also apply to [subflows](https://servicenow-prod.fluidtopics.net/rdjXjcHvTmif13bwuZtdtg#flows__subflows-design-considerations).

Prevent conflicting or duplicate business logic

:   Automations can be created with Flow Designer, business rules, workflows, and Integration Hub. Before you start using Workflow Studio, make sure you understand how existing ServiceNow AI Platform automations work. Deactivate automations before replacing them with Workflow Studio flows and actions. See the [Architecture Overview](https://servicenow-prod.fluidtopics.net/BAsHRW3B8J0LEd3Gj4ydug "Understand how Workflow Studio works within the ServiceNow AI Platform to activate, trigger, and process flows and actions.") to learn how Workflow Studio works within the ServiceNow AI Platform.

    Review [Flows](https://servicenow-prod.fluidtopics.net/rdjXjcHvTmif13bwuZtdtg "Workflow Studio is the default ServiceNow AI Platform process automation builder used to create flows. Workflow Studio replaces the Workflow Editor."), [Sub-flows](https://servicenow-prod.fluidtopics.net/tkHG4AFtgHWT8QaG91zY4g "Workflow Studio is the default ServiceNow AI Platform process automation builder used to create subflows. Workflow Studio replaces the Workflow Editor."), and [Actions](https://servicenow-prod.fluidtopics.net/ssofuDFBgikvwwTRvpRm8w "Workflow Studio is the default ServiceNow AI Platform process automation builder used to create actions. Workflow Studio replaces the Workflow Editor.") documentation, if necessary.

Determine whether your flow needs a trigger or variable input{#flows__constant-or-variable-input}
:   Flows always run when their trigger conditions are met. Triggers always provide the same data as input for flows.
    If
    you need variable input to initiate a flow instead, create a [subflow](https://servicenow-prod.fluidtopics.net/rdjXjcHvTmif13bwuZtdtg#flows__subflows-design-considerations).

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

Grant flow roles to access role-protected data and preserve user information{#flows__flow-roles-permissions}
:   Flow roles help keep permissions for your flows simple. Use flow roles to preserve user information and grant access to data, instead of running a flow as the system user. Adding flow roles also gives access to additional
    data that a user-initiated flow does not usually have. The roles granted only apply to the flow. They do not apply to the user who initiated the flow.

Use flow logic or a schedule-based trigger to control flow timing{#flows__flow-timing}
:   Flow logic or schedule-based triggers help to optimize the performance of your flows. Do not use the gs.sleep() method to wait within a flow. The gs.sleep() method prevents the thread
    from performing other work. To run a flow at a specific time, use a schedule-based trigger. To pause a flow for a specific duration, use the [Wait for a duration](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.") or [wait for condition](https://servicenow-prod.fluidtopics.net/VDz6yVuI59WBV_cH2Rk0ug "Pause a flow until record values match a specific set of conditions.") flow logic.

Avoid dependencies
:   Parallel branches that depend on each other stall a flow when a branch has to wait for output from another branch.

Scope loop counters{#flows__exit-conditions}

:   Script loops don't have a maximum number of iterations, so loops execute infinitely when there is not a valid exit condition.

    To make sure that there is a valid exit condition, use scope loop counters in inline scripts or in script steps within an
    action. Add `var` to`for (i=0; i< length;
    i++)` and get `for (var i=0; i< length; i++)`

Limit For Each and Do Until loops to 1000 iterations
:   Iterations with 1000 or more loops can lead to memory issues.

    * Set max records on Look Up Records to 1000.
    * Avoid changing property sn_flow_designer.max_iterations, which defaults to 1000.
    * For large amounts of data processing, consider batching into smaller batches.
    * For bulk imports, consider [concurrent imports](https://www.servicenow.com/docs/access?context=concurrent-imports&version=australia&pubname=australia-integrate-applications&ft:locale=en-US).
    {#flows__ul_a2s_c2f_ntb}

Use QuickAPI for faster executions (business rule alternative)
:
    * [QuickAPI](https://www.servicenow.com/docs/access?context=ScriptableFlowRunnerScopedAPI&version=australia&pubname=australia-api-reference&ft:locale=en-US) executions are much faster, but there is less debugging capability.
    * Foreground QuickAPI executions run in the user session as the user who called the flow.
    * Background QuickAPI executions run in a background thread and are run in the 'system' user session.
    {#flows__ul_b2s_c2f_ntb}

Use Do Until loops instead of calling flows from themselves
:   A flow calling itself is not allowed and errors out. But if flow A is calling flow B, then flow B can call flow A up to three times.

Execute flows in the background
:   Executing flows in the background enables
    UI threads to be released rather than keeping users waiting
    for flow executions.

Avoid flow logic that waits after collecting a large output
:   Using a large payload immediately after it is retrieved can help prevent memory
    issues.

Minimize switching between environments
:   Constantly switching back and forth between instance and
    MID
    Server steps in a flow can lead to delays in processing. To minimize the risk of delays, limit switching between instance and MID to only one time.

Include sys_complex_object records generated by the flow in update sets
:   Missing [complex data](https://servicenow-prod.fluidtopics.net/tYVT1pPJOWkjWSc3dPFAWQ "Use a graphical interface to work with collections of complex structured data. Help design users understand the organization of structured data, and add, remove, or configure its individual elements.") schemas can cause execution issues. Make sure you include sys_complex_object records generated by the flow in update sets.

Calling flows from a script
:   Start flows with a custom trigger by calling from a script.

Avoid deploying newer release flows to instances on older releases
:   Workflow Studio does not support deploying newer release flows to instances running on earlier releases.  
    Danger:  
    The flow data model can change between releases, which can prevent newer flows from running or produce unexpected results when running on earlier release instances. Upgrade your instances to be on the same release versions before deploying them.

Turn flow reporting off in production
:   Minimize the amount of memory required to run flows by disabling [Flow reporting](https://servicenow-prod.fluidtopics.net/0Wvrk7uR2kF3HtdQTZpAVg#enable-flow-reporting "Choose whether to generate execution details for all flows and actions run, just for individual flows and actions, or just when you test a flow or action. Specify the level of detail the execution details contain."). Flow reporting stores configuration and runtime information for the Execution Details page. These reports are good for troubleshooting, but
    requires a large amount of data to be retained both in memory and in the database. By default, flow reporting is disabled, and the system only generates execution details when you manually test a flow or action. Instead
    you can use log files, which are still available when reporting is turned off.

Reduce the amount of memory consumed in flows with nested looping
:   When reporting is activated, set com.snc.process_flow.reporting.iteration.lastn to a value of "1" to reduce the amounts of the amounts of memory that previous loop iterations consume. The more iterations you report on,
    the more memory is required.
* **[Create a flow in Workflow Studio](https://servicenow-prod.fluidtopics.net/gEVHy7dO3gkmJ7P2I90Ygg)**   
  Run a sequence of actions and flow logic when the trigger conditions occur.
* **[Default read-only flows](https://servicenow-prod.fluidtopics.net/iRcaQiW6AnunStcMFUvvyg)**   
  Open existing flows in a read-only state to protect them from accidental changes. While a flow is in a read-only state, you can only review, test, deactivate, or request to edit it.
* **[Flow and subflow stages](https://servicenow-prod.fluidtopics.net/gUI6yI1xjkduFlwX7yT2wA)**   
  Communicate the current stage of a request, flow, or subflow with an end user.
* **[Flow error handler](https://servicenow-prod.fluidtopics.net/DGh47bZrLnm7_v3V4~Vt1Q)**   
  Enable flows to catch errors. Run a sequence of actions and subflows to identify and correct issues. For example, have flows log output values, send notifications, and run corrective subflows when they produce an error.
* **[Flow execution analysis](https://servicenow-prod.fluidtopics.net/O5WUnOK6WaNQjN_mumM0CA)**   
  Analyze flow execution details to identify errors and suggest potential fixes.
* **[Flow generation](https://servicenow-prod.fluidtopics.net/z2iZQNnZx36HkehaRXDvDw)**   
  Use ServiceNow Otto for Creator to create a flow or subflow from a text description.
* **[Flow generation with images](https://servicenow-prod.fluidtopics.net/SMa6Mftj6Rt2XQVm3EqxGQ)**   
  Create a flow or a subflow from an image by using ServiceNow Otto for Creator.
* **[Flow history](https://servicenow-prod.fluidtopics.net/EglnbILl0FY1hMyMFxWb8g)**   
  View and manage the history of a flow. See past configurations of a flow to copy, restore, or remove them.
* **[Flow recommendations](https://servicenow-prod.fluidtopics.net/cpd7ZDB7gVPLqRU_InWqWg)**   
  Select the next component in your flow from a list of AI-generated recommendations.
* **[Flow roles](https://servicenow-prod.fluidtopics.net/XdVk0vgxYbYYmytwHd~GtQ)**   
  Create flows and subflows that run with specific roles. Assigning roles enables you to create user-initiated flows that run with their own roles rather than the user's roles.
* **[Flow summarization](https://servicenow-prod.fluidtopics.net/qWTaC0u2~wUdWZZAqF195w)**   
  Summarize what a flow or subflow does by using generative AI.
* **[Flow Template Builder](https://servicenow-prod.fluidtopics.net/k8KYvnpYY7EJ~By8fwTBjw#flow-template)**   
  Enable citizen developers to create their own flow templates. Flow Templates guide flow authors to create flows for common use cases. Use the flow template builder to define flows, actions, and flow template variables.
* **[Inline scripts](https://servicenow-prod.fluidtopics.net/IvnVdbhN2MqmXg2GwAWwQQ)**   
  Enable users with coding experience to write inline scripts that set and modify input values during the configuration of an action or flow. Use inline scripts to modify input values that require small format conversions, data transformations, or math operations.
* **[Save as you go flows](https://servicenow-prod.fluidtopics.net/A27mjcn8uv9Bd8ICeMPptw)**   
  Save flows, subflows, and actions automatically as you work on them.
* **[Summarize a flow](https://servicenow-prod.fluidtopics.net/8p1GNBE1Wj8xhf763kyKhg)**   
  Generate a summary of a flow or flow execution details with ServiceNow Otto for Creator.
* **[Flow variables](https://servicenow-prod.fluidtopics.net/7pX~DmbaDDD5QaEJEAWGRA)**   
  Similar to Workflow scratchpad variables, create variables that you can use and modify directly in your flow. Access flow variables as data pills directly in the Data panel.

