- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
ServiceNow & Twilio SMS: Real‑Time Alerts with Notify, Flow Actions, and AI Summaries
Introduction: Bringing Communication to the Next Level
Keeping everyone in the loop during an incident or outage can be difficult—especially when email inboxes are overwhelmed. Integrating Twilio with ServiceNow changes the game by enabling real-time SMS and voice alerts directly from the platform. With the Notify plugin, you can automate alerts, schedule messages, and enable two-way SMS conversations, all within the ServiceNow interface. In this guide, I’ll walk through how to configure Twilio and ServiceNow and demonstrate two practical automation use cases. We’ll also explore an AI-powered bonus that summarizes incoming SMS messages and automatically updates incident records.
Why Integrate Twilio with ServiceNow?
- Real‑time communication: Instead of relying solely on email, you can send instant SMS updates about incidents, approvals, or outages.
- Two‑way conversations: Use Twilio’s messaging service to allow engineers or customers to reply via SMS and update records in ServiceNow.
- Unified experience: The Notify plugin bridges ServiceNow and Twilio, so your team can send texts, make calls, and manage messages without leaving the ServiceNow platform.
At a high level, the integration works like this:
Incident → ServiceNow → Twilio → End‑user’s phone
A notification button (e.g. Send SMS) appears on incident records, making it easy to trigger updates without custom scripts.
Prerequisites
Before diving into configuration, you’ll need:
- A Twilio account (a free trial works fine).
- A ServiceNow Developer instance (available via ServiceNow’s Developer Portal).
- A Twilio number with SMS and voice enabled.
Within Twilio, you’ll need your Account SID and Auth Token—think of these as your username and password to connect your ServiceNow instance to Twilio. In ServiceNow, ensure you have access to the Notify plugin (often available through a developer or sandbox instance).
Configuring Twilio
- Find your credentials: Log into the Twilio console and copy your Account SID and Auth Token from the dashboard.
- Buy or select a number: Choose a phone number that supports both SMS and voice messaging. Twilio allows you to search for numbers by country and capabilities.
- Create a Messaging Service (optional but recommended): A Messaging Service groups multiple numbers and handles routing and scaling for high‑volume SMS. Add your purchased number to this service.
These steps prepare Twilio to communicate securely with ServiceNow.
Installing and Configuring the ServiceNow Notify Plugin
- Install the plugin: In ServiceNow, navigate to Plugins and search for Notify. If you need voice calling, install Notify with Twilio Direct Driver.
- Configure the Twilio driver: Under Notify Properties, enter your Twilio Account SID and Auth Token.
- Import numbers: Use the Notify Number Groups module to import the Twilio numbers you purchased or added to your Messaging Service. Assign each number to an appropriate group (e.g. “Incident Notifications” or “Customer Alerts”).
Once configured, the Notify plugin provides a foundation for sending SMS from workflows, business rules, or scripts.
Enabling Advanced SMS Features
You can enhance your SMS setup by leveraging Twilio’s advanced options:
- Intelligent SMS handling: Automatically detect if a recipient can’t receive messages (e.g. landlines) and fall back to email.
- Notify groups: Organize numbers by function (e.g. one group for customers, another for engineers) and specify different workflows for each.
- Advanced SMS tab: Configure settings like localised delivery times and maximum message lengths.
- Notify Properties: Adjust global Notify settings, such as default number groups or throttling controls.
These features help tailor your notifications to different audiences and scenarios.
Use Case 1: Send SMS via Flow Designer using Twilio Spoke
The Twilio Spoke provides native Flow Designer actions—no scripting or plugin gymnastics required. Here’s how to send SMS:
- Ensure Twilio Spoke is installed and configured.
- Go to Flow Designer > New Flow, name it (e.g., Notify_Caller_SMS).
- Set the trigger (e.g., Run Once or Incident Updated).
- Add the action:
- Select Action > Twilio > Send SMS.
- Configure the fields:
- From: Your Twilio number
- To: Caller’s or recipient’s mobile number
- Message: Dynamic message (e.g., "Incident ${number} has been updated. Assigned to ${assigned_to}")
- Test and review:
- Run the flow and validate the Execution Details.
- Open the generated SMS record to check the status (queued = success).
- Optional:
- Validate delivery in the Twilio Console → Message Logs.
📝 Tip: Message delivery info is available for 7 days in Twilio.
Use Case 2: Auto‑Notify Engineer via a Business Rule
Sometimes, you need a more customised approach. A server‑side Business Rule paired with a direct Notify API call can automatically alert engineers when high‑priority incidents occur.
Here’s a sample script:
SNC.Notify.sendSMS(
'+18444312908', // Twilio number sending the SMS
'' + current.assigned_to.mobile_phone, // Engineer’s mobile phone
message, // Message body (e.g. “High Priority Incident detected…”)
current // GlideRecord context (so Notify can log the message)
);
This script sends an SMS whenever a new high‑priority incident is inserted. To implement this:
- Create a Business Rule that runs after insert, with a condition checking for high priority.
- Paste the script into the advanced script field (script tab).
- Test by creating a new high‑priority incident. The assigned engineer’s phone should receive the alert instantly.
Bonus: AI‑Powered Incoming SMS Handling
SMS isn’t just for outbound messages. With a bit of scripting and OpenAI’s API, you can summarize incoming messages and update incidents automatically:
- Store your OpenAI API key in a secure location (e.g. ServiceNow’s Credential Store).
- Create a script include called OpenAISummarizer that calls the OpenAI API to generate summaries of incoming texts.
- Build a Notify Message workflow with three key steps:
- Run Script: Call OpenAISummarizer on the incoming text.
- Set Value: Update the incident with the returned summary.
- Send SMS back: Respond to the user confirming their message was summarized and logged.
The result is a system that not only forwards SMS messages to the right incident but also summarizes content using AI. This can be particularly helpful when customers send lengthy text updates.
Pro Tips
- Add retry logic in your workflows or scripts to handle temporary Twilio outages.
- Schedule SMS using ServiceNow’s Scheduled Jobs if you need periodic reminders.
- Use Twilio webhooks and ServiceNow inbound actions to track message delivery and handle replies.
- Secure your Auth Token: Store credentials in ServiceNow’s credential management system rather than hardcoding them in scripts.
Conclusion
Integrating Twilio with ServiceNow unlocks a host of mobile‑first capabilities—from simple notifications to sophisticated AI‑enhanced message handling. Whether you use Flow Designer, workflows, or direct scripts, each method offers a powerful toolset to keep your teams and customers informed in real time. Give it a try in your developer instance, and let us know what innovative SMS solutions you build next!
Stay curious, stay clever, and keep automating!
- 1,755 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.