Send email notification from a Transform Map script

Dazler
Mega Sage

Hi, I have been tasked with creating an inbound action from an excel sheet.  I got this working.  My excel sheet imports and then creates the Requested Items as it should.

One of the things is that once my excel sheet imports, then in my transform map I have a gliderecord that checks the User table to make sure the user has an account within ServiceNow.  If they do not have an account, then we need the transform map to send a notification for the users on the excel sheet that we didn't find in ServiceNow.  I know that I can't use html mail script in this.

How can I achieve this?  I have reviewed several links, but none doesn't provide great instructions.

This is what I've tried.  In my tranform map, I have added the following event queue.

find_real_file.png

 

I set up an event registry and then a notification.

find_real_file.png

find_real_file.png

 

But this is not working.

Any help would be appreciated.

1 ACCEPTED SOLUTION

MrMuhammad
Giga Sage

1. Replace current with source in the gs.eventQueue method. 

gs.eventQueue('new_hires_not_found', source, source.u_hiring_manager_eamil, hiringMgr);

2. Check Event Logs to confirm whether or not the event is getting triggered or not.

3. If the event triggers then the issue is with notification.

4. Make sure "Event param 1 contains recipient" is checked on the notification.

 

Regards,
Muhammad

View solution in original post

10 REPLIES 10

DrewW
Mega Sage
Mega Sage

One item that I see is your Subject.  Event parms are string fields so you cannot do "event.parm1.name".