Inbound Action for incoming emails that dont match any of the conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2012 03:40 PM
We are having a problem with users emailing the service-now mailbox instead of the Service Desk. We would like to change our inbound email rules so that if no matches are found the last action is to trigger a reply email to the sender indicating that they should be emailing the our service desk rather than the service-now email address. Has anyone done something like this? Im having trouble finding a way to get an inbound email script to create no record but still produce a notification. I assumed I could have it create an event but it just skips the rule entirely if there is no record to create. Anyone have an idea for me?
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2012 06:40 AM
Something like this may work. Firing the notification and aborting the record from creating.
gs.eventQueue();
current.setAbortAction(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2014 01:11 AM
Hi,
did you manage to get this working, we have exactly the same issue?
Foster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2014 04:24 PM
I don't have experience doing this so I don't know if it will work. But I think it will!
You can create a business rule on sys_email that is conditionalized to the situation you describe. I image the conditions are target field(instance😞 empty, created: today, type: received and email.to doesn't contain the service desk email. More conditions are better if you can come up with more.
Table: sys_email
Condition:
current.instance.isNil() && gs.now().indexOf(current.sys_created_on)> -1 && current.type == 'received'
Script:
if (current.recipients.indexOf('<servicedeskemail@domain.com>') < 1) {//enter your service desk's email
//service desk email not found in recipients, fire event:
var evet = new GlideRecord('sysevent');
evet.initialize();
evet.process_on = gs.nowDateTime();
evet.name = "<your event.notification>";//enter your event name
evet.parm1 = <info to pass to your notification>;//can parse parm1 in the notification.
evet.insert();
}
Untested and untried, but i think something like this should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2014 05:22 AM
Many thanks for the responses, will have a look at creating a rule when I
get 5 mins