Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rad2
Mega Sage


The example I have considered - To send out an SMS to the caller when an incident with priority 1 is updated.

This article involves sending an SMS with the help of Twilio, Notify and Flow designer.

Step 1: Activate the plugin Notify

Plugin NameNotify
IDcom.snc.notify

Step 2: Configure Twilio with Notify

We would need a twilio account to configure with notify. Once you signup for a trial version, you would be provided with application SID and authentication token. This is visible in dashboard once you create a project on twilio. Ex. screenshot mentioned

find_real_file.pngfind_real_file.png



  • Now on ServiceNow, go to section Notify → Administration → Twilio Configuration.

find_real_file.png

Step 3: Flow Designer

Here I have used a flow designer to create a trigger when the incident is created with priority 1.
To create a flow
-Go to Flow Designer → Designer
Trigger

  • Incident Updated

Actions

  • Send SMS through notify
  • Log

Ex. of Flow

find_real_file.png

Send SMS through notify is a custom action which has the code to send SMS to a mobile number provided.
In this action we have added the following code in script -

(function execute(inputs, outputs) {
   var notify = new sn_notify.NotifyScoped();
   var from = '<from>';
   var to = inputs["to"];
   new notify.sendSMS(from, to, "Incident with Number " + inputs["incident"]["number"] + "- " + inputs["incident"]["short_description"]);
})(inputs, outputs);
  • Ex. of Flow action

find_real_file.png

Step 4: Test
This can be tested from the test button on the Flow

find_real_file.png

This is a very basic example of how to use twilio with ServiceNow.
PS - To use Notify in a scoped application use - sn_notify.NotifyScoped(), else SNC.Notify() would work

Hope it helps!

Comments
Feddy
Tera Guru

This is very helpful. 
We got one requirement that we need to send bulk sms to users with record producer link in it at once.
Any input on this would be much appreciated. Also would like to know how use emergency outreach .

Version history
Last update:
‎02-13-2019 02:00 AM
Updated by: