Workflows

Create a Workflow in ServiceNow

Workflows automate complex multi-step processes that need approvals, notifications, and task creation when records change. This guide walks you through building a workflow from scratch using the legacy Workflow Editor.

Why workflows still matter despite Flow Designer

Before Flow Designer existed, workflows were the only way to automate complex business processes in ServiceNow. While ServiceNow pushes Flow Designer for new automation, thousands of production instances still run on legacy workflows, and many admins inherit them. Workflows handle the messy reality of enterprise processes — parallel approvals, conditional branching, timer-based escalations, and complex integrations. The people maintaining these systems need to understand both platforms because ripping out working workflows for Flow Designer migrations is expensive and risky.

How workflows execute and connect to tables

A workflow is a series of connected activities that execute when a record meets specific conditions. You attach workflows to tables, set trigger conditions (usually based on field values or record state), and the workflow runs automatically when those conditions are met. Start with a simple linear flow — trigger, approval, notification, task creation. Then add complexity: parallel approvals using AND/OR logic, conditional branches based on field values, and timer activities for SLA escalations. The Workflow Editor is drag-and-drop, but the real work is in configuring each activity's properties and connecting the right transitions.

Production workflow patterns and maintenance

Once your basic workflow runs, the improvements that matter are: adding proper error handling with exception flows, implementing escalation paths for stalled approvals, and creating reusable sub-workflows for common patterns. Production workflows need comprehensive logging, clear naming conventions for activities, and documentation for the business logic. The biggest maintenance headache is workflows that never end — always include timeout conditions and exception handling. Consider Flow Designer for net-new processes, but don't migrate working workflows unless there's a compelling business reason.

Before you start

  • workflow_admin role or admin role
  • Table you want to attach the workflow to must exist
Sourdough
Chrome Extension

Sourdough: ServiceNow Monitoring and Analytics

A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.

Instance HealthGraphs & ChartsAPI HealthDeveloper ToolsQuick SearchInstance Switcher
Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Step by step

1

Navigate to Workflow Editor

Go to Workflow → Workflow Editor. Click New Workflow. Set the Table to the table that will trigger this workflow (like Incident or Change Request). Name your workflow descriptively — include the table name and process purpose. Leave Active unchecked until you're ready to test.

TIP

Always develop workflows in inactive state — active workflows with no activities will still consume processing cycles.

2

Configure the workflow trigger conditions

Click on the Begin activity (green circle). In the Condition field, set when this workflow should start — typically something like 'state changes to Pending Approval' or 'priority is 1-Critical'. Use dot-walking for related table fields like opened_by.department.name. Test your condition logic carefully because overly broad conditions create performance problems.

TIP

Use current.changes() in conditions to only trigger when specific fields actually change, not on every record update.

3

Add and configure activities

Drag activities from the palette on the left into the workflow canvas. For approvals, use 'Approval - User' or 'Approval - Group' and set the Approvers field to a user, group, or script that determines approvers dynamically. For notifications, use 'Send Email' and reference a notification record. For task creation, use 'Create Task' and populate the assignment group and description. Configure each activity's properties before moving to the next.

TIP

Use 'Run Script' activities sparingly — complex logic belongs in Script Includes that the workflow calls.

4

Connect activities with transitions

Click on an activity and drag the connector arrows to the next activity. Most activities have multiple exit points — approvals have 'approved', 'rejected', and 'cancelled' transitions. Set conditions on transitions when needed, like routing based on approval outcomes or field values. Create parallel flows by connecting one activity to multiple next activities.

TIP

Always connect rejected approval paths to either End activities or cleanup activities — don't leave them dangling.

5

Add End activities and error handling

Drag 'End' activities from the palette and connect all workflow paths to them. Name each End activity descriptively like 'End - Approved' or 'End - Cancelled'. Add a 'Timer' activity before critical approvals to handle SLA deadlines. Connect timeout transitions to escalation activities or automatic approval/rejection.

6

Check in and activate the workflow

Click 'Check in' to save your workflow design. This creates a new workflow version and makes it available for activation. Go to Workflow → Workflows, find your workflow record, and check the Active checkbox. Set the Order field to control execution priority if multiple workflows exist on the same table. Test with a record that meets your trigger conditions.

TIP

Use the workflow context menu to 'Validate' before checking in — it catches basic configuration errors like unconnected activities.

Best practices

  • Always include timeout conditions on approval activities — workflows waiting indefinitely for approvals become technical debt that's hard to clean up later.

  • Use workflow variables to pass data between activities instead of querying the same record repeatedly — it's faster and more reliable.

  • Name your activities descriptively like 'Approval - Manager for Hardware Requests' rather than generic 'Approval' — debugging complex workflows months later depends on clear naming.

  • Avoid putting complex business logic directly in workflow conditions — create Script Includes for reusable logic and call them from 'Run Script' activities.

  • Set explicit Order values on workflows attached to the same table to control execution sequence — relying on default ordering causes unpredictable behavior.

Test Your Knowledge

Quick 3-question quiz — see how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue