Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Provider notification does not send to group

ehgebla
Giga Guru

Hi everyone, 
I have no idea what the issue here might be, but we started setting up provider notifications (to get rid of mails for our agents) and all of them are working fine when they'll be send to one user (e.g. mentioned by, additional comment/work note added to record etc).

What we now want to have is the simple notification when a new record arrives in one of their groups but is unattended. I used the exact same parameter as for our email notification, and added "Recipients listed in field" > Assignment Group.

Cap1.PNG
Content Class is set to Next Experience.

However, no notification is to be shown by the bell. The trigger is somehow successfully working it seems, as far as I can see in the log.


We're getting the following in the logs for the execution:

 

For Synchronous Providers: Loaded 1 recipients and 0 destinations and delivered to 0 destinations in 4ms

For Synchronous Providers: 'INC: Assigned to group' do not have any associated Common Content or Provider Content or Default Content for the Provider 'Workspace', this provider will not be initialized.

For Asynchronous Providers: Loaded 1 recipients and 0 destinations and delivered to 0 destinations in 4ms

 

Can someone help me out?



1 ACCEPTED SOLUTION

Update: Zurich

Thanks to @mukesh_adh for pointing out that this appears to have been sorted in Zurich. Now you can just set the provider notification up the way you would expect by picking a group reference field.

 

Rhodri_1-1760598476300.png

As you can see above the notification is set to target recipients listed in fields, and the field selected is a group reference field (assignment group)

 

 

Result:

Rhodri_0-1760598412648.png

 

You've also got the option of picking groups via a related list at the bottom, though obviously this is static.

Rhodri_2-1760598890276.png

 

 

 

 

Old pre-zurich solution:

 

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

    gs.eventQueue('testEvent', current, getGroupMembers(current.assignment_group), current.number);

})(current, previous);

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

 

Have a go with the above, this is the business rule script (just replace the eventname "testEvent" with your own). The condition  I set was just when assignment group changes.

 

The event log looks like this when triggered:

Rhodri_0-1693485925406.png (note all the user sys_ids, comma separated in parm1).

 

Rhodri_1-1693486000470.png

 

Rhodri_2-1693486040061.png

Looking at the logs above it looks to be working

Rhodri_3-1693486650370.png

 

 

Let me know if any luck/still issues. This is for the notification bell notifications right? (workspace experience > administration > notification triggers)

 

View solution in original post

14 REPLIES 14

Hi @GnaneshP hopefully you found a solution to this, apologies I missed your reply!

I think everything you have looks good and it's the notification setup, namely the when to run tab. I expect your condition (below) is clashing and stopping the notification from triggering. You should not need any conditions on here, because the BR which triggers the event is conditional itself - so you would want to run every time the event triggers.

Rhodri_0-1732533192787.png

 

Hope that helps!

Ashok Kachwaha
Tera Contributor

how can i send the same to Microsoft teams ?

shailyb
Tera Contributor

How can we send to microsoft teams using virtual agent chatbot

 

mukesh_adh
Tera Contributor

Putting Assignment group in Recipients listed in fields seem to working fine now. I'm on a Zurich instance.

nityabans27
Kilo Patron

Hi @ehgebla,

 

Problem->

Provider notifications (Teams, Mobile, etc.) don’t expand Assignment Group into its users — unlike email notifications.
So when you set “Recipients listed in field → Assignment group”, nobody gets notified.


⚙️ Fix Options

1. Scripted Recipient (recommended for direct fix)
Add a script to return all group members:

(function() {
  var users = [];
  var grp = current.assignment_group;
  if (grp) {
    var gr = new GlideRecord('sys_user_grmember');
    gr.addQuery('group', grp);
    gr.query();
    while (gr.next()) users.push(gr.user.toString());
  }
  return users;
})();

2. Flow Designer Approach
Trigger a flow on record creation →
Condition: Assignment group != null and Assigned to = null
Action: Send Provider Notification → Recipients: group members (via script or lookup).

3. Notification Subscriptions (if available)
Use built-in “new record assigned to my group” subscriptions so ServiceNow auto-manages recipients.