Automatic Teams Notification when Major Incident ticket is Submitted

JuliusE
Tera Contributor

We have not integrated ServiceNow with Teams yet and I've been asked the question if Teams can send automatic notifications to specific groups when an MIM is submitted.

 

I am aware of the Notifications coming from ServiceNow, but can Teams messages and/or Notifications be used to make specific groups or users aware when a particular MIM ticket is submitted?

2 REPLIES 2

DineshS
Tera Guru

Although I am yet to try, but try adding Provider Notification under ServiceNow for Microsoft 365

DineshS_0-1739919119327.png

 

M Shivani
Tera Guru

 Hi @JuliusE ,

Groups and Users can receive notifications in teams. 

  • Use Provider Notifications to send notifications to individuals using ServiceNow Virtual Agent chat in teams. Refer to this article to create provider notification - Notify User in Teams Bot 
  • Use Flow Designer to send notifications to groups in Microsoft Teams. To achieve this, ensure that each group has a specified Teams channel. Utilise the "Look Up Channel Name" and "Post Message" actions available in the Microsoft Teams Integration Spoke within Flow Designer. These actions help identify the appropriate Teams channel and send notifications to the group. To notify specific group in teams channel refer to this article Notify Group in Teams Channel

TO SEND NOTIFICATIONS TO GROUP :  

  • Create an event on incident table.
  • Create a business rule on incident table that returns group members of assignment group on incident record. 

      Use the below script : 

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

    gs.eventQueue('sn_now_teams.afc.incidentassignedto.group', current, getGroupMembers(current.assignment_group), current.number);

    })(current, previous);

    function getGroupMembers(groupID) {
    var group= [];
    var groupMemberRec = new GlideRecord('sys_user_grmember');
    groupMemberRec .addQuery('group', groupID);
    groupMemberRec .query();
    while (groupMemberRec.next()) {
    groupArr.push(groupMemberRec .user.sys_id.toString());
    }
    var sysIdArray = group.join();

    return sysIdArray;
    } 
  • Trigger provider notification when event is fired. Check param1 as param 1 contains sys ids of all the user records part of assignment group.

Regards, 

Shivani