Event got triggered but notification not triggered

varma2
Mega Sage

Hi All,

 

I need to trigger the notification from flow design using the event, in the event only i need to define the group dynamically.

below script works in event log it shows user sys id in Param 1 but notification not triggered.

 

var grp = current.getValue('reslovergroup'); 
var arr = [];

var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group', grp);
gr.query();
while (gr.next()) {
arr.push(gr.getValue('user'));
}

// gs.eventQueue parameters: eventName, GlideRecord, parm1, parm2
// You cannot pass an array directly. You must either loop or join it.

for (var i = 0; i < arr.length; i++) {
gs.eventQueue('your.event.name', current, arr[i], '');
}

Please suggest

8 REPLIES 8

@Bhuvan   nope i can see the user sys id in event log.

@varma2 

 

Can you share screenshots of your notification configuration ?

 

Thanks,

Bhuvan

Hi @Bhuvan  

Please refer the below screenshot. 

 

varma2_0-1757949187764.pngvarma2_1-1757949218858.png

Thanks

@varma2 

 

Please check below posts for reference

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0791868

 

https://www.servicenow.com/community/developer-forum/event-being-fired-but-email-notification-not-be...

 

Check instance email logs as from your screenshots it show email notifications are triggered.

 

If email logs do not show any entry, check if event name is correct in BR and matches event registry. Using scripts background check using a sample record if event parm1 is set correctly.

 

If this helped to answer your query, please mark it helpful & accept the solution. 

 

Thanks,

Bhuvan