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.

How to send notification out when a sys_user_group "ABC" gets a new member or when a member leaves

Nathan Okh
Mega Sage

I have a requirement that I'd like to build out in Flow Designer or any way that makes sense (an event for example). When a new or existing user is added to group "ABC" it will send a notification out, and when an existing user is removed from group "ABC" it will send a different notification.

Can anyone help?

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Nathan Okh 

 

I am not 100% sure

but for this, need to get the count of group member and then compare if current count less then previous ( leave) else some one join.

 

https://www.servicenow.com/community/developer-forum/how-to-count-number-of-group-members-in-the-gro...

 

https://developer.servicenow.com/blog.do?p=/post/training-glideagg/

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Thank you for your quick reply! I have taken a look and this looks like possibly a way to go for every new update... but definitely not going to work when a member is removed from the group...

 

1. Create a business rule count

2. create a notification for that event etc. 

Correct @Nathan Okh 

 

Give a try and share the feedback.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Thanks. I found a simpler way to make the notification on the Addition of a user to Group "ABC". 

  1. Create a notification on the sys_user_groupmember > Create a condition to look for that specific group, on Insert or Update and user is Active etc. > Send notification.

The issue I have now is how to create a notification when a user is removed from Group "ABC" and notify a specific group of that user's credentials etc.