Email Notifications: calling a script include to populate data.

tahnalos
Kilo Sage

I am trying to set up a notification that will call additional information from a different form.

 

Here is how I have this set up:

1) A scheduled Job is used to trigger a script on certain records on a table that will then fire a notification event (optional question: is it possible to do this via flow?)

2) Once the event is fired, it will run a notification on those records.  The only problem that I have is that I need additional data from a second table to be included in the body of this notification.  I have a script include ready to go in this regard.  Question is, how do I call this script include in the body of the email?

4 REPLIES 4

Samaksh Wani
Giga Sage
Giga Sage

Hello @tahnalos 

 

Plz refer the below link for your solution.

 

https://www.servicenow.com/community/developer-forum/creating-schedule-job-to-send-notification/m-p/...

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

 

You obviously did not read my post.  I am already doing this.  I want to include other info in the body of the email.

Ankur Bawiskar
Tera Patron
Tera Patron

@tahnalos 

you can use email script which is a server side script. include this email script in email body.

Ensure you pass correct parameters etc

OR

use the same script which you are using in script include function directly in email script

Scripting for email notifications 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hello, I saw that link earlier, but it seems rather ambiguous as to how to set it up.  Do you have a link that provides examples of this?

 

Thanks