How to add "Requested for" in cc in "Notification" activity of workflow

sameekshasa
Tera Contributor

Hi @Ankur Bawiskar ,

I want to send a notification using a workflow. In the "To" field, I have added a distribution list (DL). In the "CC" field, I need to include the "Requested For" user, which will be selected by the user when submitting the form. Could you please suggest how this can be achieved? Do I need to write an email script and reference it in the "To" field as well?

Thanks in advance!

5 REPLIES 5

Ankur Bawiskar
Tera Patron

@sameekshasa 

how are you sending email via workflow?

via notification activity or Event activity?

share screenshots

to include CC you need to use email script only

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

I am sending an email through Notification activity.

@sameekshasa 

you need to use <mail_script> within that notification activity message

AnkurBawiskar_0-1770181731343.png

Give correct variable name

<mail_script>
	email.addAddress('cc',current.variables.requestedFor.email.toString(),current.variables.requestedFor.name.toString());

</mail_script>

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Tanushree Maiti
Tera Guru

To add the "Requested for" user to the CC list in a ServiceNow workflow notification activity, you must use the email script (Give it a name like cc_user_add) in the Notification activity.

In the script, use email.addAddress("cc", current.variables.requested_for.email, "Name"); to dynamically add the user. 

In the notification body , call it ${mail_script:cc_user_user}

Please mark this response as Helpful and hit Like if it assisted you with your question.
Regards,
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: