Workflows need to send emails at specific steps — when an approval comes back, when a task completes, when something fails. This guide shows you how to configure the Notification activity to send automated emails with access to your workflow's scratchpad data.
What workflow notifications replace
Before workflow notifications, you had to build email logic into every script that needed to communicate status changes. Developers wrote custom email templates, hardcoded recipient lists, and used gs.eventQueue() calls scattered throughout business rules and scripts. When requirements changed — new recipients, different content, updated branding — you hunted through code to find every place emails got sent. Workflow builders and platform admins inherit these fragmented email implementations that are impossible to maintain consistently.
How workflow notifications work
The Notification workflow activity lets you send emails directly from a workflow step using ServiceNow's notification engine. You can reference existing email notifications (the ones in System Notification > Email > Notifications) or create new ones on the fly. The key advantage is access to workflow.scratchpad variables in your email templates — you can pass data between workflow activities and include it in notifications. Start with existing notifications when possible, create custom ones when you need workflow-specific content or recipients that aren't available in standard notifications.
Production-quality notification improvements
Basic workflow notifications work but need refinement for production use. Add conditional logic so emails only send when needed — not on every workflow execution. Create reusable notifications that multiple workflows can share instead of embedding everything in the workflow activity. Set up proper error handling with notification failure detection. For complex scenarios, consider using Run Script activities with gs.eventQueue() to have full programmatic control over when and how notifications fire, especially when you need dynamic recipient calculation or complex conditional logic.
Before you start
- •itil role or higher to edit workflows
- •SMTP configured and working (test with any existing notification first)
Sourdough: ServiceNow Monitoring and Analytics
A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.
Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.
Step by step
Open your workflow for editing
Navigate to Workflow > Workflow Editor. Find your workflow and click the name to open it. If it's published, you'll need to check it out first by clicking the checkout icon in the workflow header. The workflow canvas opens with your existing activities.
Unpublished workflows stay checked out to you automatically — no checkout step needed.
Add the Notification activity
In the Activities panel on the left, expand Core Activities and drag Notification onto your workflow canvas. Position it where you want the email to send in your process flow. Connect it to the previous activity by dragging from the output connector to the Notification activity's input.
Configure the notification source
Double-click the Notification activity to open its properties. In the Notification field, you have two options: click the magnifying glass to select an existing notification record, or leave it blank to create a custom notification. If using an existing notification, search by name and select it. The activity inherits the template's subject, body, and default recipients.
Use existing notifications when the content and recipients match your needs — you get automatic updates when the notification record changes.
Set recipients and override content
In the Users field, specify who gets the email. You can reference workflow variables like ${current.assigned_to} or scratchpad variables like ${workflow.scratchpad.manager}. Leave blank to use the existing notification's recipient list. To override the notification template, check 'Override subject/message from notification' and fill in custom Subject and Message fields. Here you can use workflow.scratchpad.variable_name syntax to include workflow data.
Add workflow scratchpad variables
In your email content (subject or message), reference scratchpad variables using ${workflow.scratchpad.variable_name} syntax. For example: 'Request ${workflow.scratchpad.request_number} has been approved by ${workflow.scratchpad.approver_name}'. These variables must be set by earlier workflow activities like Set Values or Run Script activities.
Test scratchpad variable names in a Run Script activity first — undefined variables show as blank text in emails without throwing errors.
Configure activity completion settings
Set the Activity Name to something descriptive like 'Email Requester Approval'. In the Advanced tab, set 'Wait for completion' based on your needs: check it if the workflow should pause until the email sends (rare), leave it unchecked for fire-and-forget emails (typical). Save the activity properties and save your workflow.
Test the notification flow
Publish your workflow if it's ready for testing. Trigger the workflow through whatever initiates it (business rule, UI action, etc.) and verify the email sends with the correct content and recipients. Check the Email Log (System Logs > Email) to confirm delivery and troubleshoot any failures. Verify that scratchpad variables populate correctly in the email content.
Best practices
Always set meaningful scratchpad variables before the Notification activity — empty variables show as blank text without errors, making emails look broken.
Use existing notification records when possible instead of overriding content in the workflow — changes to centralized notifications automatically apply to all workflows using them.
Don't set 'Wait for completion' on notification activities unless the workflow truly cannot proceed if the email fails — it creates unnecessary delay and failure points.
For complex recipient logic or conditional sending, use a Run Script activity with gs.eventQueue() instead of the Notification activity — you get full programmatic control over when emails fire.
Test notification activities with actual email addresses, not just admin accounts — SMTP configuration issues often appear only when sending to external addresses.
Test Your Knowledge
Quick 3-question quiz — see how your ServiceNow skills stack up.
A list view on a table with millions of records is slow. Best fix?
Select an answer to continue