adding cc email address in notification activity

Rahul Raja Sami
Tera Guru

Hi I am using this to add email address in cc of notification activity

 

<mail_script>


email.addAddress("cc", 'test@gmail.com' );


</mail_script>
The following are the details of the requester

Requester = ${current.variables.requested_for}
Email Address of Requester = ${current.variables.email_address}

 

but I want add the cc as ${current.variables.email_address} but that is not working.why?

 

1 ACCEPTED SOLUTION

this works

 

 

<mail_script>

var email = current.variables.email_address.toString();
email.addAddress("cc", email);


</mail_script>
The following are the details of the requester

Requester = ${current.variables.requested_for}
Email Address of Requester = ${current.variables.email_address}

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Hi @Rahul Raja Sami ,

  1. Open the workflow that contains the notification activity you want to modify.

  2. Click on the notification activity to select it.

  3. In the properties panel on the right side of the screen, click on the "Advanced" tab.

  4. Scroll down to the "CC List" field and enter the email addresses you want to include in the CC list, separated by commas.

  5. Save the changes to the notification activity.

  6. Publish the workflow to make the changes effective.

When the notification is sent, the email addresses in the CC list will receive a copy of the notification along with the primary recipient(s).

Note that the ability to modify workflows and notification activities may be restricted based on your ServiceNow role and permissions.

 

 

Hi Sandeep,

I doubt that we dont have cc field on Notification activity

RahulRajaSami_0-1683031799614.png

please check

Community Alums
Not applicable

Hi @Rahul Raja Sami ,

use the following mail script in workflow notification activity message to achieve that:

<html>
<body>
<mail_script>
email.addAddress("cc","test@test.com");
</mail_script>

 

this works when we give directly the email address but I want to fetch the mail from the variables. like mentioned above