Email validation failed: Email has no recipients.

Lisa Conn
Tera Expert

Hello Experts,

I am creating a flow that is supposed to send an email to a group when a record is created. When testing, I keep getting "Email validation failed: Email has no recipients."

The test results show the sys_id of the group record in the "To" runtime value. According to this article: 

https://docs.servicenow.com/bundle/vancouver-build-workflows/page/administer/flow-designer/reference...

I should be able to send an email to a group record if it has the Include member option enabled. I have confirmed that all groups have members and all members have emails.

Any idea what I'm doing wrong?

 

Thanks!

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

In the doc, it specifies that to send email to a group, you must provide a group email address. which means the Group you are referring to should have a group email. So the other option is inline script in To field to retrieve the email id of each member in comma separated format 

 

SanjivMeher_0-1709764170037.png

 


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

View solution in original post

4 REPLIES 4

Sumanth16
Kilo Patron

Hi @Lisa Conn ,

 

Cause

Check the flow to see the user for whom the email was suppose to be sent.

When we checked in cmn_notif_device table for that user, primary email device was inactive

 

Resolution

Activating the primary email device of user fixed the issue.

 

Refer to bekow thread:

https://www.servicenow.com/community/now-platform-forum/flow-designer-error-email-validation-failed-...

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

 

 

Thanks & Regards,

Sumanth Meda

SanjivMeher
Kilo Patron
Kilo Patron

In the doc, it specifies that to send email to a group, you must provide a group email address. which means the Group you are referring to should have a group email. So the other option is inline script in To field to retrieve the email id of each member in comma separated format 

 

SanjivMeher_0-1709764170037.png

 


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

Hi,

 

Would you mind providing an example of the 'inline script' in the To field to retrieve the email ide of each member in comma separated format? I would greatly appreciate it.

 

Thanks,

Cyn

cynlink1
Tera Expert

I found an example in another post of an inline script provided by nagydan2 for the To field. It worked! 🙂

 

 

 

//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;​