{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":4062,"path":"build-workflows/workflow-studio/create-flow.md","title":"Create a flow in Workflow Studio","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a flow in Workflow Studio\n\nRun a sequence of actions and flow logic when the trigger conditions occur.\n\n\\[Omitted video\\] Description: Create a flow with Workflow Studio\n\n## Before you begin\n\n-   Create or select an application to store your Workflow Studio content.\n-   Role required: flow\\_designer or admin\n\n## About this task\n\nUsers 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.\n\nCreating a custom application to contain your Workflow Studio content enables you to [deploy](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/c_SharingApplications.md) the application using the application repository or the ServiceNow Store.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n2.  From the Workflow Studio home page, select **New** &gt; **Flow**.\n\n3.  Select whether to build the flow with Now Assist or to build the flow from scratch.\n\n    To build a flow with Now Assist, see [Create a flow with AI](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-flow-now-assist.md).\n\n    To build a flow from scratch, continue to the next step.\n\n4.  Select the **Build from scratch** tab.\n\n5.  On the Flow Properties screen, fill in the fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |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.|\n    |Description|Description of your flow.|\n    |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.|\n    |Domain|Domain scope of the flow. For more information about domain separation, see [Domain separation explained](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/bp-what-is-domain-separation.md).|\n\n<table id=\"table_ltx_mlf_b1c\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nProtection\n\n</td><td>\n\nSelection 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.\n\n</td></tr><tr><td>\n\nRun as\n\n</td><td>\n\nOption 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.\n\n **Note:** By default, flows run as the user who initiates the session.\n\n 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/oauth-2-credentials.md).\n\n 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.\n\n **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.\n\n</td></tr><tr><td>\n\nRun with roles\n\n</td><td>\n\nRoles that the flow runs with. This option is only available when **Run as** is set to **user who initiates the session**.\n\n</td></tr><tr><td>\n\nFlow Priority Default\n\n</td><td>\n\nPriority level at which you want the system to run this flow by default. Options include:\n\n-   Low\n-   Medium \\(Default\\)\n-   High\n To learn about flow priority levels, see [Flow priority](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-priority.md).\n\n</td></tr></tbody>\n</table>6.  Select **Submit**.\n\n    **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.\n\n    The system displays the Workflow Studio design environment.\n\n7.  Create a trigger for the flow.\n\n    **Tip:** You can either create a trigger for the flow or use a saved trigger. To use a saved trigger, proceed to the next step.To learn more about saved triggers, see [Building triggers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/building-triggers.md)\n\n    1.  Under the TRIGGER section, select **Add a trigger**.\n\n    2.  From the Trigger list, select a trigger that will start running your flow.\n\n        For more information on trigger types, see [Workflow Studio flow trigger types](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-triggers.md).\n\n        The system displays a set of fields depending on the type of trigger that you've selected.\n\n    3.  Set up your trigger by filling in the fields.\n\n        For a record-based trigger, for example, select a table and set field conditions that, when met, will start running your flow.\n\n    4.  Click **Done**.\n\n8.  Select a saved trigger for the flow.\n\n    Skip this step if you have already created a trigger in the previous step.\n\n    1.  Under the TRIGGER section, select **Add a trigger**.\n\n    2.  From the Trigger list, under INSTALLED SPOKES, select the application under which the trigger was created.\n\n        For example, Global.\n\n        Workflow Studio displays a list of triggers that are in the selected application.\n\n    3.  Select the trigger.\n\n        Depending on how the trigger is configured, you may be able to view the trigger properties or add additional conditions to the trigger.\n\n    4.  Select **Done**.\n\n9.  To add actions, flows, subflows, or flow logic, select **Add an Action, Flow Logic, or Subflow**.\n\n    1.  Select an option.\n\n<table id=\"table_smq_3ys_tcb\"><thead><tr><th>\n\nOption\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAction\n\n</td><td>\n\nSelect the desired action. Workflow Studio includes [Workflow Studio actions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-actions.md) 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/integrate-applications/integrationhub.md) and [Spokes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/spokes.md) plugins install additional actions.\n\n To add draft actions from the More Actions menu, set **Show draft actions** to **true**.\n\n To view spokes that are available in the ServiceNow Store, set **Show store spokes** to **true** from the More Actions menu.\n\n**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.\n\n</td></tr><tr><td>\n\nFlow Logic\n\n</td><td>\n\nSelect an option to specify conditional or repeated operations.\n\n</td></tr><tr><td>\n\nSubflow\n\n</td><td>\n\nSelect 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.\n\n</td></tr></tbody>\n</table>        To change the order of an action in a flow, drag the handle on the left side of the action to the desired location.\n\n        The system displays a set of fields depending on the option that you selected.\n\n    2.  To configure the action, flow logic, or subflow, fill in the fields.\n\n    3.  Select **Done**.\n\n    4.  Repeat adding actions until complete.\n\n10. Select **Save**.\n\n    Workflow Studio saves a draft of the flow, trigger, and actions.\n\n\n## What to do next\n\n-   Test your flow until you're ready to activate it.\n\n    **Note:** The system only triggers activated flows.\n\n-   Deploy or transfer your flow to another instance.\n    -   [Deploy](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/c_SharingApplications.md) your flow from the application repository when your application is complete and ready for release.\n    -   [Transfer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/update-set-transfers.md) 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.\n\n-   **[Create a flow with AI](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-flow-now-assist.md)**  \nUse generative AI to create a flow from text directionsand images.\n-   **[Create a flow with an inbound email trigger](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-inbound-email-flow.md)**  \nStart a flow when your instance receives an email.\n-   **[Create a flow with a Kafka Message trigger](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-flow-kafka.md)**  \nBuild a flow that processes events from a Kafka stream. Start the flow when an event is available in the specified topic.\n-   **[Create a flow with a MetricBase trigger](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-mb-flow.md)**  \nStart a flow when a MetricBase trigger is met. MetricBase triggers track time series data and can monitor when a threshold is reached, when a trend is detected, or when a system stops reporting data.\n-   **[Create a flow with a Proactive Analytics trigger](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-flow-proactive-analytics.md)**  \nUse Performance Analytics indicators to start a flow. Define the flow start conditions as a set of Proactive Analytics KPI scores and KPI threshold values.\n-   **[Create a flow with a Service Catalog trigger](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-sc-flow.md)**  \nStart a flow when a Service Catalog item is requested to automate the fulfillment process.\n-   **[Create a flow with an SLA Task trigger](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-sla-task-flow.md)**  \nConfigure your Service Level Agreement \\(SLA\\) definition to run a flow as the action plan.\n-   **[Create a flow with an external trigger](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-a-flow-with-an-external-trigger-definition.md)**  \nSet up a flow with a base system external trigger definition. The flow responds to an event-driven external trigger from a third-party system. For example, run a flow when an issue is created in a third-party issue-tracking system.\n-   **[Create a flow with roles](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-flow-roles.md)**  \nCreate a flow or subflow that runs with assigned roles. Assigning roles enables you to create a user-initiated flow that runs with its own roles rather than the user's roles.\n-   **[Create flow Service Catalog variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-flow-catalog-variables.md)**  \nCreate Service Catalog variables that are only available to a specific Service Catalog flow. Flow-specific variables are available to catalog tasks and actions in the flow.\n-   **[Create a decision table in a flow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-decision-table-flow.md)**  \nCreate the structure for a decision table while you author your flow in Workflow Studio. Use data from the flow to create inputs, conditions, and results for the decision table, all in a convenient modal. For example: You can store the logic for incident assignments in a Decision Table, and then use that Decision Table within a flow.\n-   **[Copy a flow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/copy-flow.md)**  \nCopy a flow to give it a new name and move it to another application scope.\n-   **[Duplicate an action or subflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/duplicate-action-subflow.md)**  \nDuplicate an action or subflow within a flow.\n-   **[Test a flow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-test.md)**  \nBefore activating a flow so other users can access it, test to make certain it works the way you expect.\n-   **[Activate a flow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-activate.md)**  \nActivate a flow to make it available to run.\n-   **[Change a flow or action's default title](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/manage-natural-language-title.md)**  \nChange the default title for a flow, subflow, or action by adding styled and dynamic text.\n-   **[Edit a flow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-edit.md)**  \nEdit an existing flow.\n-   **[Delete a flow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-delete.md)**  \nDelete a flow that you no longer need.\n-   **[View activated flows for a table](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/view-activated-flows.md)**  \nView flows with record-based triggers that run on a specific table.\n\n**Parent Topic:**[Building flows](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flows.md)\n\n"}}