Unable to send sms to group using Incident alert management

Tushar
Kilo Sage
Kilo Sage

I am working on ServiceNow integration with Twilio.

I've set up the connection successfully and am able to send by selecting a single user, but the issues come when I select the group to whom I want to send the SMS.

 

I've added the group to Incident Communication Task -

 

Tushar_1-1677763911514.png

 

but it gives me the error "You cannot send sms as there are no users selected"

 

Tushar_0-1677763765299.png

while the same group works perfectly fine when the channel is set to Email.

Tushar_2-1677764678367.png

 

Also followed the solution mentioned on this post - https://www.servicenow.com/community/developer-forum/incident-alert-management-sms-not-sending-to-gr...

7 REPLIES 7

sr82
Giga Guru

Hi Tushar, did you find solution for the problem? I am facing similar situation, when creating SMS task manually and adding recipient User it works fine but when selecting recipient Group then no members from the group are selected.

Tushar
Kilo Sage
Kilo Sage

Hi @sr82 

 

Unfortunately it's not working yet, when selected recipient and group as it's not supported by ServiceNow.

 

I will keep checking in upcoming versions and keep you updated.

 

Note - Recipient is working for internal users but not for contacts.

 

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Regards,
Tushar

Kshira
Tera Expert

Any updates? I am also facing similar issue

I put a workaround in place and it seems to give me result I was expecting.

 

Problem I was facing, when creating SMS task manually from Major Incident workbench and selecting a Group to send SMS out, system was not adding group members in Recipient list.

 

Workaround I used was that when you submit Incident communication task system creates a Group type Contact record against the Group you have selected in communication task

sr82_0-1694601942820.png

 

I added an on Insert Business rule to run on contact table with condition to check 'Type' on Contact record is is 'Group' and in which case insert Users record in Contact table based on Group. 

 

 

Script:

(function executeRule(current, previous /*null when async*/ ) {

var member = new GlideRecord('sys_user_grmember');
member.addActiveQuery();
member.addQuery('group', current.group);
member.query();
while (member.next()) {
var user = new GlideRecord('contact');
user.initialize(); {
user.table = current.table;
user.document = current.document;
user.type = 'sys_user';
user.user = member.user;
user.insert();
}
}

})(current, previous);