Create a flow in Workflow Studio
- UpdatedJan 30, 2025
- 7 minutes to read
- Yokohama
- Create Workflows
Run a sequence of actions and flow logic when the trigger conditions occur.
Before you begin
- Create or select an application to store your Workflow Studio content.
- Role required: flow_designer or admin
About this task
Users with the flow_designer or admin role should know the application table structure and be aware of any existing business logic associated with the target tables of a flow or subflow. Be sure to disable any conflicting business rules or workflows before creating a flow or subflow.
Creating a custom application to contain your Workflow Studio content enables you to deploy the application using the application repository or the ServiceNow Store.
Procedure
- Navigate to All > Process Automation > Workflow Studio.
- From the Workflow Studio home page, select New > Flow.
-
Select whether to build the flow with Now Assist or to build the flow from scratch.
To build a flow with Now Assist, see Create a flow with Now Assist.
To build a flow from scratch, continue to the next step.
- Select the Build from scratch tab.
-
On the Flow Properties screen, fill in the fields.
Field Description Flow name Name to uniquely identify your flow. The system converts the flow name into an internal name by replacing space characters with underscore characters. Description Description of your flow. Application Application scope to create your flow in. Global is the default. The application scope determines what data your flow can access and what data it can share. Domain Domain scope of the flow. For more information about domain separation, see Domain separation explained. Table 1. Additional properties Field Description Protection Selection to specify if the flow is read-only. You can only select a value when you create the flow in an application scope that you own. 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.
Note: By default, flows run as the user who initiates the session.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.
When flows run as the user who initiates the session, the system limits flow actions by user ACL restrictions. Ensure that security restrictions don't prevent users who trigger the flow from performing flow actions. Flows run by the initiating user also respect user-specific settings such as date/time formats.
Note: Inbound email flows ignore this setting and always run as the user who initiates the session. To test access controls for an inbound email flow, impersonate a typical inbound email user and manually trigger the flow.Run with roles Roles that the flow runs with. This option is only available when Run as is set to user who initiates the session. Flow Priority Default Priority level at which you want the system to run this flow by default. Options include:- Low
- Medium (Default)
- High
To learn about flow priority levels, see Flow priority.
-
Select Submit.
Note: If this is your first time in Workflow Studio, a welcome screen appears. You can choose to either take the welcome tour or skip the tour for now.The system displays the Workflow Studio design environment.
-
Add a saved trigger to the flow.
Note: You can either create a trigger for the flow or use a saved trigger. To create a trigger, proceed to the next step. For information about creating a saved trigger, see Create a saved trigger.
- Under the TRIGGER section, select Add a trigger.
-
From the Trigger list, under INSTALLED SPOKES, select the application under which the trigger was created.
For example, Global.Workflow Studio displays a list of triggers that are in the selected application.
-
Select the trigger.
Depending on how the trigger is configured, you may be able to view the trigger properties or add additional conditions to the trigger.
- Select Done.
-
If you want to create a trigger for the flow, perform the following steps:
- Under the TRIGGER section, select Add a trigger.
-
From the Trigger list, select a trigger that will start running your
flow.
For more information on trigger types, see Workflow Studio flow trigger types.The system displays a set of fields depending on the type of trigger that you've selected.
-
Set up your trigger by filling in the fields.
For a record-based trigger, for example, select a table and set field conditions that, when met, will start running your flow.
- Click Done.
-
To add actions, flows, subflows, or flow logic, select Add an
Action, Flow Logic, or Subflow.
-
Select an option.
Option Description Action Select the desired action. Workflow Studio includes Workflow Studio actions that are available to flows and subflows. Alternatively, a user with the action_designer role can create additional actions to add to flows. The Integration Hub and Spokes plugins install additional actions.
To add draft actions from the More Actions menu, set Show draft actions to true.
To view spokes that are available in the ServiceNow Store, set Show store spokes to true from the More Actions menu.Note: Under Not Installed Spokes, the system displays spokes that are available in the ServiceNow Store based on compatibility with the ServiceNow version and application dependency on Workflow Studio.Flow Logic Select an option to specify conditional or repeated operations. Subflow Select a published subflow and define the input values. In addition to adding a subflow as a flow action, you can enable the Show triggered flows option from the More Actions menu to select an activated flow and define the required inputs. Running a triggered flow ignores its trigger conditions and runs all actions. To change the order of an action in a flow, drag the handle on the left side of the action to the desired location.
The system displays a set of fields depending on the option that you selected. - To configure the action, flow logic, or subflow, fill in the fields.
- Select Done.
- Repeat adding actions until complete.
-
Select an option.
-
Select Save.
Workflow Studio saves a draft of the flow, trigger, and actions.
What to do next
- Test your flow until you're ready to activate it.Note: The system only triggers activated flows.
- Deploy or transfer your flow to another instance.
- Deploy your flow from the application repository when your application is complete and ready for release.
- Transfer your flow from an update set XML file when you want to test the flow on another instance. When you save a flow, Workflow Studio generates a single update set file containing its subflows and actions.