How to configure a notification for a custom event for Integartion success or fail

raj12345
Tera Contributor

 

Hi Community,

I have a scheduled job that syncs user data from ServiceNow to Greenhouse via their API. Once the job completes, I want to trigger a notification indicating whether the sync was successful or failed.

I'm using a custom event like this in my script:

 

Passed in Schdeule Job
gs.eventQueue('event', null, gs.getUserName(), message);

Since I passed null as the GlideRecord, the event is not tied to any specific table. However, when setting up the notification in System Notification > Email > Notifications, the Table field is mandatory.

My Questions:

  1. What table should I select for this kind of generic/global notification?

  2. Is selecting the Global table the best practice in this case?

  3. Are there any potential issues I should be aware of when triggering events like this without a record?

Appreciate any guidance or best practices!

Thanks in advance. 

1 ACCEPTED SOLUTION

@raj12345 

Would you mind closing your question by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

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

View solution in original post

7 REPLIES 7

@Ankur Bawiskar Thank you!

 

@raj12345 

Thank you for marking my response as helpful.

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

@raj12345 

Would you mind closing your question by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

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