Workflows

Add an Approval Activity to a Workflow

Workflow approval activities let you pause automated processes and wait for human decisions before continuing. This guide shows you how to add approval activities that handle both user and group approvals with proper notifications.

Why workflows need approval activities

Before approval activities, developers had to build approval logic manually — creating approval records, setting up notifications, managing state transitions, and handling timeouts. This meant reinventing the same approval patterns repeatedly across different workflows, often with inconsistent behavior. Process owners and business users need predictable approval behavior, and workflow builders need a reliable way to pause execution until someone makes a decision.

How approval activities work

An approval activity is a workflow component that creates an approval record, sends notifications, and waits in 'Waiting' state until someone approves or rejects. You configure who can approve (user, group, role, or script result), what information they see, and what happens next. The activity has two exit paths — one for approve, one for reject — that connect to different workflow branches. The key decision is your approver source: hardcoded users work for simple cases, but dynamic assignment using current record fields or scripts handles complex approval routing.

Building robust approval flows

Once basic approval works, production workflows need timeout handling, escalation paths, and delegation support. Add timeout activities that fire after a set duration to handle abandoned approvals. Configure approval notifications with rich context so approvers can make informed decisions quickly. For complex scenarios, chain multiple approval activities or use approval group activities where multiple people must approve. The difference between basic and production-quality approval workflows is comprehensive error handling and clear audit trails.

Before you start

  • workflow_admin or admin role
  • An existing workflow in draft or published state
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

Open your workflow for editing

Navigate to System Applications > Workflow > Workflow Editor. Search for and click your target workflow. If it's published, you'll need to create a new version by clicking the 'Create Version' button before making changes.

TIP

Published workflows can't be modified — always work in draft versions.

2

Add the approval activity

From the Activities panel on the right, drag either 'Approval User' or 'Approval Group' onto your workflow canvas. Approval User requires one person to approve, Approval Group requires approval from anyone in the specified group. Position the activity where you want the workflow to pause for approval.

TIP

Use Approval Group when you don't care who approves, just that someone from the group does.

3

Configure the approver source

Double-click the approval activity to open its properties. In the 'User' field (for Approval User) or 'Group' field (for Approval Group), you can enter a specific sys_id, select from a dropdown, or use dynamic assignment. For dynamic assignment, reference workflow variables like '${workflow.variables.assigned_to}' or use JavaScript like 'answer = current.assigned_to;' in the 'Script' tab to determine the approver at runtime.

4

Set approval context and journal

Fill in the 'Due date' field if you want a deadline (use relative dates like '2 days' or specific dates). The 'Journal' field becomes the approval description that approvers see — make this contextual by including workflow variable values like 'Please approve ${workflow.variables.item_name} for ${workflow.variables.requested_by}'. Leave 'Comments' blank unless you want to pre-populate the approval record.

TIP

Due dates create urgency but don't automatically timeout — you need separate timeout activities for that.

5

Configure approval notifications

On the 'Notifications' tab, check 'Send approval request notification' to automatically notify the approver when the workflow reaches this activity. Select an existing approval notification or create a new one. The notification has access to all workflow variables and the approval record context for personalization.

TIP

Test notifications in sub-production first — approval emails with broken variable references look unprofessional.

6

Set up approve and reject transitions

Right-click the approval activity and select 'Add transition' to create paths for 'Approved' and 'Rejected' outcomes. Connect the 'Approved' transition to whatever should happen when approved (often a fulfillment activity). Connect the 'Rejected' transition to activities that handle rejection (like sending rejection notifications or closing the workflow).

7

Validate and publish the workflow

Click 'Validate' to check for errors like missing transitions or invalid variable references. Fix any issues shown in the validation results. Save your changes, then click 'Publish' to make the workflow version active and available for execution.

Best practices

  • Always provide both approve and reject transition paths — workflows with only approve transitions leave rejected requests in limbo.

  • Use workflow variables in approval journal text instead of hardcoded values so approvers get meaningful context about what they're approving.

  • Set reasonable due dates on approvals to create urgency, but also build timeout activities that handle overdue approvals automatically.

  • Test approval activities with actual user accounts, not admin accounts — approval permissions and delegation behave differently for regular users.

  • Avoid using script-based approver assignment unless necessary — field-based assignment is more maintainable and performs better.

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