{event.param1} and ${event.param2} in notification doing the same thing.

dev115415
Tera Expert

Hello

I am sending email from ServiceNow using Event triggering approach. 

I want to fetch the data from the 3rd and 4th parameter of eventQueue

gs.eventQueue('x_1041234_needlt.eventForSendingMail', '' , 'London', 'England'); as written in script include

                   Now in notifications, in email body, if I tend to use {event.param1}  then it returns England and not London as expected. Like both {event.param1} and ${event.param2} returning the same thing.

13 REPLIES 13

@dev115415 

without glideRecord how will event get processed

Also notification has to be triggered on some record right so you need to pass the gliderecord object.

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

Hello 

My app has no use of glide record object as I am getting data via REST call and then passing some info of that to email via notification(using event triggering to just trigger the notification).

What should I do for this case?

@dev115415 The notification record is added on some table only right.

It means the notification will be sent for the record of that table.

If no record of table then how can you send the notification.

 

Table field on notification is mandatory.

jaheerhattiwale_0-1685690701116.png

 

 

So check the notification you are triggering and get the table from there. Query that table and add the gliderecord object to eventQueue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

Hello I can select table as none and it is still able to send email. Am I going wrong anywhere. Also once again I do not want to use any table, gliderecord in my app. Is there any alternate way to send an email. ChatGpt shows some glideoutboundemail approach but I do not know how to use that.