Help with Sending an Email Notification on last Approval made

johndel
Giga Contributor

I have catalog item that has a workflow (for sc_req_item table). The workflow has multiple approval process. Each approval made will trigger an email notification sent to the owner of the request. The email notification is configured to be triggered for every update on the sysapproval_approver table. I would like to send a copy to an email address when the last approval is completed. How will I do that?

1 ACCEPTED SOLUTION

Hi Chuck,



I found out a solution. I just edited the existing Mail Script of the Email Notification and added a line like this:



//email.addAddress(type, address, displayname);


email.addAddress("cc", "john.copy@example.com","John Roberts");


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


View solution in original post

8 REPLIES 8

Chuck Tomasi
Tera Patron

Hi Johndel,



Add either a notification activity or an event activity to your workflow to trigger a notification after all activities are complete.



Notification Activities - ServiceNow Wiki


Email Notifications - ServiceNow Wiki  



Personally, I prefer the event method as it allows changes to the notification w/o checking out the workflow later. It also allows for multi-lingual capabilities later, and centralized notification administration.


Thanks for the response Chuck. I am stuck in this problem. I have a notification that is working everytime an approver approves. It is linked to Approval table. If I will create an email notification that get's triggered by an event, how will I include the RITM Number and Catalog Item Name of the Request in the email content? I believe in my current email notification, the fields of Approval table are the only ones available.


Hi Johndel,



The email is going to be triggered from the workflow so you'll have access to the RITM data automatically. The notification is not tied to the approval table.


Thanks Chuck. I will try this.