I want to send notification when n number of users added in a group

Amol Pawar
Tera Guru

Hi All,

 

I have a requirement where I need to send two notifications. The first notification I want to send is when 45 members are added to a group and the second notification I want to send is when the 50th member is added to that group.

Adding group members is happening by workflow since it requires approval from admins.

 

Seeking the best and easy approach for this.

 

Thanks in advance,

Amol

 

7 REPLIES 7

piyushsain
Tera Guru
Tera Guru

Create a after insert BR calling a Script include in condition on table Group member (See screenshot)

if condition is satisfied (count>45 or count >50) trigger an event sending notification

piyushsain_0-1690467598148.png

piyushsain_1-1690467635807.png

Please let me know if any issues. If you want only one notification you can add the check by GlideRecord the sys_email table.

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

@Amol Pawar please let me know if this solves your issue

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

Harshal Aditya
Mega Sage
Mega Sage

Hi @Amol Pawar ,

 

Hope you are doing well.

 

You can follow below steps -

 

1. Create two events in event registry.

2. Create a after insert business rule on sys_user_grmember table and count the members added using glideAggregate

3. Trigger the event when count is = 45 and count =50

4 Configure email notifications to trigger

 

If the email body is same then you can use only one event as well

 

Please mark this response as correct or helpful if it assisted you with your question.

Regards,
Harshal

Amol Pawar
Tera Guru

Hi @Harshal Aditya ,

Thank you for your reply, could you please provide a demo script so that I can refer?

 

Thanks,

Amol