Exploring subflows

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:9分
  • Subflows automate a repeatable multi-step process that also produces an output needed by another process. When a playbook, flow, or script calls a subflow, the subflow runs a sequence of reusable actions and flow logic to complete the process and produce output values.

    Subflows overview

    Parts of a subflow including the calling source, inputs, subflow steps, and outputs.

    A subflow is an automated process consisting of a sequence of reusable actions and flow logic, data inputs, and outputs. In contrast to flows, subflows do not have a trigger but instead run when called from a playbook, flow, another subflow, or a script. The inputs describe the data used to run the subflow. The actions perform a sequence of operations on your data. For example, the Change - Implementation tasks subflow creates an implementation and a post implementation task given a input change record.

    Building and managing subflows requires that you have some familiarity with the ServiceNow AI Platform tables and fields that the application or process uses. Process analysts can create subflows using available actions or use an existing subflow as a template. See Building subflows.

    Subflows consists of the following components.

    Subflow Inputs
    A subflow input stores data used to run the subflow. Each input has a name and a data type. You can define one or more inputs that are available to the subflow. When calling a subflow, flow authors must provide data values for the subflow inputs.
    Subflow outputs
    A subflow output stores data generated by a subflow. Each output has a name and a data type. You can define one or more outputs that are available to the subflow. When calling a subflow, flow authors can use subflow outputs as data for operations later in the flow. You can use the Assign subflow outputs flow logic to set output values.
    Subflow execution details
    A subflow execution details page allows a flow author to view run-time information about an action or flow directly from the design environment. You can view details such as the current sate, actions or steps run, output values generated, and errors produced. See Flow execution details.
    Flow error handler
    A flow error handler enables a subflow to catch and report errors from the subflow execution details. Run a sequence of actions and subflows to identify and correct issues. For example, have subflows log output values, send notifications, and run corrective subflows when they produce an error. See Flow error handler.
    Actions
    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. See Workflow Studio actions.

    For detailed instructions for creating a subflow, see Create a subflow in Workflow Studio.

    Subflows benefits

    Subflows provide process owners and developers these benefits:
    • Automates repetitive work to improve efficiency and experience.
    • Describes a workflow in natural language to help non-technical users understand what it does.
    • Displays a workflow as a diagram to help builders see available paths and connections.
    • Enables creating and testing a workflow from a single interface to ensure it works as expected.
    • Promotes process automation by enabling subject matter experts to develop and share reusable actions with flow authors.
    • Reduces upgrade costs, with upgrade-safe ServiceNow AI Platform logic replacing complex custom script.
    • Reduces development costs by providing a library of reusable actions.
    • Scales with separate subscriptions for integration and Robotic Process Automation (RPA) functionality.
    Benefit Feature Users
    Build an automated workflow from an existing library of automated operations. Subflow Application developer, process owner, or administrator
    Run an automated workflow on demand. Subflow Application developer, process owner, or administrator
    Specify the input data that an automated workflow uses to run. Subflow Application developer, process owner, or administrator
    Store one or more outputs as data for use by other automated workflows. Subflow Application developer, process owner, or administrator
    Build an automated operation from an existing library of automated steps. Action Application developer, integration owner, or process owner
    Run an automated operation on demand. Action Application developer, integration owner, or process owner
    Use one or more inputs as data to run an automated operation. Action Application developer, integration owner, or process owner
    Store one or more outputs as data for use by other automated operations. Action Application developer, integration owner, or process owner