Event Triggered Email Notification Not Sending
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2015 10:45 AM
I have two web services used to create incidents. Each service uses a web service transform map to call the same event in an onAfter script. The event will cause an email notification to be sent. I am running into an odd issue where the email notification is sent from one of the web services but not from the other. I will try to describe my setup below:
Event
Name: incident.created.webservice
Table: Incident
Email Notification
Name: Incident Created Web Service
Event Name: incident.created.webservice
Sends When: Event is fired
Who Will Receive: Event parm 1 contains recipient
Web Service
Name: WsAlpha
Transform Map: WsAlphaTransformMap
WsAlphaTransformMap contains an onAfter script with the following:
gs.eventQueue('incident.created.webservice', target, group.sys_id, gs.getUserName());
Name: WsBeta
Transform Map: WsBetaTransformMap
WsBetaTransformMap contains an onAfter script with the following:
gs.eventQueue('incident.created.webservice', target, group.sys_id, gs.getUserName());
Scenario
When WsAlpha receives a request, an email notification is sent after the incident is created. I can see in the logs where the event is called and triggers the email notification to be sent.
When WsBeta receives a request, the event is called after the incident is created. However, an email notification is never sent. I don't see any warnings/errors in the system logs. I have found that an email notification is sent after changing the 'parm 1' parameter from group.sys_id to group.email.
gs.eventQueue('incident.created.webservice', target, group.email, gs.getUserName());
I am puzzled because the two web service transform scripts are calling the same event (also calling the same email notification as a result), but the results are different. Any kind of assistance would be greatly appreciated.
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016 06:31 AM
hi
I'm also facing the same problem. Did you find any solution ?
Thanks
Snehal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016 06:45 AM
If the email address in parm1 is the same email address as the event creators, the notification will not send unless you select "send to event creator"
It's just ServiceNow's way of being a bit pedantic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016 06:51 AM
Hi
I have "sent to event creator " is checked ,
thanks
Snehal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2017 05:06 AM
If you cannot see the notification in preview, then it should not be with the event creator property.Do you see anything in the logs, around the time notification was triggered?
Could you add some logs to your workflow/scripts (that triggers event).