Exploring flows

  • Release version: Xanadu
  • Updated September 10, 2024
  • 7 minutes to read
  • Summarize
    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 Exploring flows

    Flows in ServiceNow automate repeatable multi-step processes by running a sequence of reusable actions and logic when defined trigger conditions are met. They enable process owners and developers to build automated workflows that improve efficiency, reduce manual effort, and provide clear workflow visualization in a single interface. Flows consist of triggers, actions, flow logic, error handling, subflows, and data variables managed through Workflow Studio.

    Show full answer Show less

    Key Features

    • Triggers: Define when a flow runs, based on record operations, service catalog requests, schedules, or application events.
    • Actions: Reusable operations that automate ServiceNow AI Platform tasks without coding, such as creating records. Actions can be core, application-specific, or custom-developed and are selected via an action picker.
    • Subflows: Reusable sequences of actions without triggers, callable from flows, other subflows, or scripts.
    • Error handling: Built-in error handler sections allow flows to catch, report, and correct errors by running corrective actions or subflows.
    • Data panel: Stores flow variables generated or collected during execution, enabling data to be passed between actions.
    • Spokes: Scoped application packages containing domain-specific actions and subflows, extendable via plugins or custom development.
    • Flow Assist: AI-powered tool that generates flows from text prompts and recommends next steps within flows.
    • Flow execution details: Provides runtime visibility into flow execution, including states, outputs, and errors, accessible directly within Workflow Studio.
    • Domain separation: Supports logical separation of flows, actions, and subflows by tenant domain for controlled access and management.

    Practical Usage and Benefits

    ServiceNow customers can leverage flows to automate routine tasks such as incident management, approvals, and notifications, reducing development and upgrade costs by using reusable, upgrade-safe logic instead of custom scripting. Flows promote collaboration by allowing subject matter experts to create and share actions without coding skills, while giving developers the flexibility to build custom actions and spokes. The visual workflow diagram and integrated testing features help ensure correct operation before deployment. Additionally, roles can be assigned to flows to control execution permissions, enhancing security and governance.

    Getting Started

    To begin using flows, create a sample flow with a trigger and basic actions in Workflow Studio, utilizing the action picker to add and configure steps. Use the data panel to manage variables across actions and configure error handlers to manage exceptions. Explore existing core and spoke actions, and consider enabling Flow Assist for AI-driven flow creation assistance.

    Flows automate a repeatable multi-step process. When the flow trigger conditions are met, the flow runs a sequence of reusable actions and flow logic to complete the process.

    Flows overview

    A flow is an automated process consisting of a trigger and a sequence of reusable actions and flow logic. The trigger specifies when to run the flow. The actions perform a sequence of operations on your data. For example, the VTB Sample Flow creates and assigns a VTB card whenever a priority 1 incident is created.

    Flows consist of the following components.

    Trigger
    A trigger specifies when to run the flow. When the trigger conditions are met, the system runs the flow using the data provided by the trigger. Workflow Studio supports a variety of trigger types such as record, Service Catalog requests, and scheduled triggers. For a description of available trigger types, see Workflow Studio flow trigger types.
    Flow execution details
    A flow 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 state, actions or steps run, output values generated, and errors produced. See Flow execution details.
    Flow error handler
    A flow error handler enables a flow to catch and report errors from the flow execution details. 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. See Flow error handler.
    Subflows
    A subflow is an automated process consisting of a sequence of reusable actions, data inputs, and outputs. In contrast to flows, subflows do not have a trigger but instead run when called from a flow, from another subflow, or from a script. 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.
    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.
    Spokes
    A spoke is a scoped application containing Workflow Studio actions and subflows for managing specific tables. For example, the ITSM Spoke contains actions for managing Incident and Problem records. You can activate additional spokes from the ServiceNow Store or activating the appropriate plugin. Building your own spoke requires familiarity with application development on the ServiceNow AI Platform. For a list of available spokes, see Spokes.

    Sections of a flow

    Four sections of a flow: trigger, actions, error handler, and data panel.

    A flow consists of four sections.

    1. Trigger section
    The Trigger section is where you select and define when the flow runs. Each trigger type defines when a flow starts and the starting data available to it. There are triggers for record operations, dates, and application operations.​

    Flows support record-based, schedule-based, and application-based trigger types. For more information about available trigger types, see Workflow Studio flow trigger types.

    2. Action section
    The Actions section is where you select and configure the steps that make up your flow. You can add actions, flow logic, and subflows to a flow by opening the associated picker.

    Sequential numbers appear next to each item in the design canvas. Action numbers start with 1 and then increment by 1 as you add more items to the flow.

    3. Error handler section
    The Error handler section of the flows is where you can enable the flow to catch and correct errors. For more information about using the error handler section, see Flow error handler.
    4. Data panel
    The Data panel stores any data gathered or generated by the flow as variables. Each data variable has its own pill that Flow designers can use to drag the variable value to an action input or output. Flows generate the pill name based on the contents and its data type. The system specifies the variable data type next to the pill.
    Figure 1. Example flow data in the data panel
    Example flow data in the data panel.

    Action configuration

    Add an action to a flow by opening the action picker. Configure an action by specifying its input values, which may be data from the flow trigger or the output of other actions. Enter values for inputs directly, or use data from the Data panel to configure an action's inputs. At the start of a flow, the data may be limited to the flow trigger or subflow inputs. As you add actions to a flow, the output values of each action appear as data pills in the Data panel.

    Action picker

    In the Actions section of a flow, select Action to open the action picker. You can either enter text in the search window to search for an action, or browse the action categories to find an action that you want to add to your flow.

    Figure 2. Action picker menu
    Use the action picker to find actions that you can add to your flow.

    The Action picker consists of several features to make finding actions easier.

    Search actions
    The Action picker filters the list of actions it displays as you type. The picker only displays actions that match your search query.
    Most recent
    The Action picker displays a list of the most recent actions that you have selected during this session.
    Popular
    The Action picker displays a list of actions that other users have frequently used.
    Installed Spokes
    Some applications include spokes which add application-specific actions. Spoke actions are typically read-only but can be copied and customized. The Action picker groups actions by the application scope that they belong to. Select a spoke to see its list of actions.
    ServiceNow Core actions
    Your instance comes with a collection of core actions, or frequently used ServiceNow AI Platform operations, that can be added to any flow.
    Global spoke actions
    Developers may create custom actions in the Global application scope to make them available to all applications. ServiceNow provides some actions in the Global scope for use in any flow.
    Custom actions
    Developers may also create custom actions in an application scope that they own. Custom actions appear in the action picker under the application scope of the spoke.

    Workflow to create flows using Workflow Studio

    The following illustration describes the basic tasks involved in creating a flow using Workflow Studio. For detailed instructions for creating a flow, see Create a flow in Workflow Studio.

    Flows benefits

    Flows 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. Flow Application developer, process owner, or administrator
    Run an automated workflow when a set of trigger conditions are met. Flow Application developer, process owner, or administrator
    Use a set of trigger conditions as input data to run an automated workflow. Flow Application developer, process owner, or administrator