How to Bcc an email address for each Incident created

Cory Hitchings
Giga Guru

Hi everyone, 

We have a requirement to BCC an email address from our Service Desk to our Service Desk vendor each time an Incident or Request is created.  

Is there a way to BCC an email address on Incident and Request creation notifications only, to achieve the metrics we are after? 

1 ACCEPTED SOLUTION

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

You can specify copied and blind copied recipients by using the email object within a mail script.

email.addAddress("bcc","john.secret@example.com","John Roberts");

You have to do it for all the Email Notifications (Incident and Request creation).

For any more info, please check the official documentation below:

Example scripting for email notifications

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

View solution in original post

4 REPLIES 4

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

You can specify copied and blind copied recipients by using the email object within a mail script.

email.addAddress("bcc","john.secret@example.com","John Roberts");

You have to do it for all the Email Notifications (Incident and Request creation).

For any more info, please check the official documentation below:

Example scripting for email notifications

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

Hi Alberto,

Thank you for this info.  Can I assume that we cannot use user sys_ids here, (as we can directly in the notification), when using the bcc in the script, we need to spell out the actual email addresses correct?

Just want to confirm as I got a similar requirement. 

 

Thanks,

.ron

Cory Hitchings
Giga Guru

Thanks Alberto! Would I be applying this line here in the script?  Sorry, I'm totally new to this. 

 

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {

email.addAddress("bcc","john.secret@example.com","John Secret");

var url = '<a href="https://secret.service-now.com//' + 'secret?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id + '">Link</a>';


template.print(url);

})(current, template, email, email_action, event);

Yes. You need to add that line to your script and pass the appropriate email id below. Then you should call that script in your notification.

email.addAddress("bcc","john.secret@example.com","John Secret");


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