Create code snippets for flows, subflows, and actions
task brazil Updated Sep 10, 2026 1 min read flow-design-code-snippet.md
Generate a code snippet to call a specific flow, subflow or action.
Before you begin
- Activate the flow or subflow you want to call.
- Publish the action you want to call.
Role required: flow_designer or admin
Procedure
-
Navigate to All > Process Automation > Flow Designer.
-
Open a flow, subflow, or action.
-
Click the More Actions icon in the upper right corner of the flow designer.
-
Select Create Code Snippet.
The code snippet appears in a new window and is selected by default.
-
Copy the code by manually copying it from the pop-up modal or clicking the Copy Code Snippet Clipboard button.
What to do next
Edit the script to add any mandatory values, such as inputs.
45 lines · 1.3 KB
---
title: Create code snippets for flows, subflows, and actions
description: Generate a code snippet to call a specific flow, subflow or action.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/build-workflows/workflow-studio/flow-design-code-snippet.html
release: brazil
product: Workflow Studio
classification: workflow-studio
topic_type: task
last_updated: "2026-09-10"
reading_time_minutes: 1
breadcrumb: [API access, Configure flows, Flows, subflows, and actions, Workflow Studio, Build workflows]
---
# Create code snippets for flows, subflows, and actions
Generate a code snippet to call a specific flow, subflow or action.
## Before you begin
- Activate the flow or subflow you want to call.
- Publish the action you want to call.
Role required: flow\_designer or admin
## Procedure
1. Navigate to **All** > **Process Automation** > **Flow Designer**.
2. Open a flow, subflow, or action.
3. Click the **More Actions** icon in the upper right corner of the flow designer.
4. Select **Create Code Snippet**.
The code snippet appears in a new window and is selected by default.
5. Copy the code by manually copying it from the pop-up modal or clicking the **Copy Code Snippet Clipboard** button.
## What to do next
Edit the script to add any mandatory values, such as inputs.
| title | Create code snippets for flows, subflows, and actions |
| description | Generate a code snippet to call a specific flow, subflow or action. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/build-workflows/workflow-studio/flow-design-code-snippet.html |
| release | brazil |
| product | Workflow Studio |
| classification | workflow-studio |
| topic_type | task |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | API accessConfigure flowsFlowssubflowsand actionsWorkflow StudioBuild workflows |