script for event-triggered notifications

bonsai
Mega Sage

I created an event-triggered notification.

 

 

An event can have two arguments.

 

 

I'm thinking of setting a string in the event argument and having the notification template split the argument string and set it.

 

 

I am new to notification scripts.

 

Could you tell me how to reflect the event content in the notification template?

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, if you are setting a single event parameter with multiple string values to represent an array or object, then you will need to utilize a notification email script as there is no functionality available in 'notifications' that will allow you to extract the separate values from the single event parameter.

Scripting for email notifications (servicenow.com)

 

View solution in original post

2 REPLIES 2

Tony Chatfield1
Kilo Patron

Hi, if you are setting a single event parameter with multiple string values to represent an array or object, then you will need to utilize a notification email script as there is no functionality available in 'notifications' that will allow you to extract the separate values from the single event parameter.

Scripting for email notifications (servicenow.com)

 

Prateek kumar
Mega Sage

You can pass an object in your parameter and retrieve the values on the email script.

Check below:

https://www.servicenow.com/community/developer-forum/how-to-send-more-than-2-parameters-in-an-event/...


Please mark my response as correct and helpful if it helped solved your question.
-Thanks