How to send email to all group member in Flow Designer

Prins Kumar Gup
Giga Guru

Hi All,

Is it possible to send an email to an all group member in Flow Designer from Send Email action?

Please suggest me.

TIA

PKG

5 REPLIES 5

Hi Jaydeep,

Thanks for quick response, but my requirement is when I send the email to that particular group after that email received the all group member. 

nagydan2
Tera Contributor

Unbelievably no solution to this.... Until now! 🙂

Drop down the Fx button next to "To" in the Send Email Action step.

 

Put this in the script:

 

 
//Get email addresses of SAM group members
//"SAM" groups SysID is: "8111195edb5333300b79d44444b961998"".
var samARR = [];
var groupGR = new GlideRecord('sys_user_grmember');
groupGR.addQuery("group", "8111195edb5333300b79d44444b961998");
groupGR.query();
while(groupGR.next())
{
samARR.push(groupGR.user.email);
}
var SAMstr = samARR.join(',');
return SAMstr;​
 
 
 
Last step: Mark this useful, if it was :)))

Thank you it worked !! ðŸ™‚