- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2019 11:04 PM
Hello Folks,
We have activated Notify plugin in our servicenow and bought a number from Twilio.
We are using "Send SMS" activity in our alert workflow to notify users.It is working as expected.
Now we have a requirement, We need to have a UI action button on Alert form "Send SMS", When I click on it a
glide window will be populated, User will enter either user name or Group name. So we want send sms to that user/Group.
I can create a ui page for glide window and take inputs from user. My Question is can we trigger sms using any script.
Can you please assist me to achieve this requirement.
Thanks
prasad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 10:32 PM
I have done this using sendSMS method in Notify API.
var notify = new SNC.Notify();
notify.sendSMS(twilio, userPhone, strMessage);
Thanks
Prasad K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2019 11:16 PM
Hi Prasad,
If you have access to the code for that activity then you can replicate that in your ui page.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2019 11:23 PM
Hi Prasad,
Please refer below link, it may be helpful.
https://community.servicenow.com/community?id=community_question&sys_id=ccf383e5dbd8dbc01dcaf3231f9619bc&view_source=searchResult
Please mark correct/Helpful, if it helps you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 01:17 AM
Hi,
I tried this,
1. You can do this inside a g: evaluate tag. This is where you run the server-side code.
<g:evaluate>
gs.eventQueue(eventName, GlideRecordObj, parm1, parm2);
</g:evaluate>
or
2. Simply write a client callable Script Inlude to trigger an event from client script of UI page.
Please mark correct/Helpful, if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 10:32 PM
I have done this using sendSMS method in Notify API.
var notify = new SNC.Notify();
notify.sendSMS(twilio, userPhone, strMessage);
Thanks
Prasad K