Last week felt great because I finally cracked a simple barrier that’s prevented me from getting started in integrating ServiceNow and Twilio for some time now. The end result has been a pretty fun and productive week, and I wanted to share with community what it took to get there and a few of the use cases we’ve either deployed or proof-of-concepted to get others interested.
- Use Case 01 | Chat agent wants to transfer customer to a phone agent
- Use Case 02 | Priority 1 Incidents text the assignment group/user dependent on CI
- Use Case 03 | Requesting scheduled call back/hold line call back
The Multi-part Twilio walkthrough: A Review

But before we get into it, the reason I am writing about this is that it was finicky to start and I couldn’t find any success in the community other then just using Notify, which is ServiceNow’s Twilio Plugin. This didn’t work for me, it really serves a specific usecase involving alerting, routing and conference calls for outages. But in order to address my business requirements, I needed to start from scratch – with a night on the couch and me experimenting in Postman trying all different ways. Then, pulling out each message and trying to reproduce in ServiceNow until it just happened to finally work. To be honest, its really the only way I code, with a hammer and a set of screws.
So for those interested, I am just gonna post the trick I used to finally get it to work.
If you don’t know what do with that, how to use it, or how to setup and use Twilio, just follow me along through the parts of this post.
The Spoiler: Secret Sauce right here
- Create new REST Message
From left side Application Navigator within your dev instance, select:
System Web Services > Outbound > REST Message - Create a new empty REST Message
Authentication Type | Basic
Create new Basic auth profile | Name = Twilio SID | Password = Twilio Auth Token – this is from Twilio home dashboard. We will acquire this later if you don’t have one now. - In related list below, create a new HTTP Method
HTTP Method | POST
Endpoint | https://api.twilio.com/2010-04-01/Accounts/${SID}/Calls.json [We are phone calls in walkthrough. Simply use Messages.json if you’d rather send a text]
HTTP Request section
HTTP Headers | Name = Content-Type | Value = application/x-www-form-urlencoded
Content | To=%2B${to}&From=%2B${from}Additional Note: to jump ahead for those familiar, in Content you can also add &Url=https://handler.twilio.com/twiml/xxxtwiMLIDxxxx if you want your call to utilize a specific TwiMLBin. Again, if that makes no sense to you, we will get there. - Save and setup the Variable Substitutions in the Related List of your newly created HTTP Method
- from | Enter the number you own from Twilio account
- to | Enter target number to send message to. If you have trial account, would be the phone you verified with Twilio account to start
- SID | .. and enter your Twilio SID in the Test Value