Why this inbound email script not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 06:13 AM
Hi,
I have an inbound email script of reply type on the case table. The goal is to send a notification to the assignee whenever a case receives an E-mail (by anyone except the assignee itself).
This is the inbound email action script (the gs.warn returns true, but the event is not triggered):
(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
var fromEmail = email.from + '';
var assignedToEmail = current.assigned_to.email + '';
var test = fromEmail != assignedToEmail;
// Implement email action here
if (test) {
gs.warn('sending the event: ' + test);
gs.eventQueue('sn_customerservice.case.update_assigned_to', current, current.assigned_to.email, current.number);
}
})(current, event, email, logger, classifier);
The event is registered like this (should the "fired by" be configured?)
And finally the notification to the assignee is configured by taking that same event as activation trigger:
Why is the event in the script not triggered? Without it triggering, the notification won't work.
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 06:47 AM
Hi @JordyZ
Did you check if your BR is running by putting logs also, check if your event is triggering by looking into event logs
Aman Kumar