We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to add "to" recipient in notification via email script. I am able to add "cc" and "bcc" users but not "to" users

Ajay Sharma2
Kilo Sage

How to add "to" recipient in notification via email script. I am able to add "cc"  and "bcc" users  but not "to" users

2 REPLIES 2

Ankur Bawiskar
Tera Patron

Hi Ajay,

you cannot set the recipient the same way you set cc and bcc

there are 2 options for recipients based on way you are triggering email notifications

1) if you are triggering email using insert/update then you can include the recipient in who will receive; there you can select the user or group,

2) if you are triggering email using gs.eventQueue('eventName', object, recipient) you can send the list of user sys_ids and email addresses in 3rd parameter

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader