Email Routing Made Easy w/ Postmaster

ben_hollifield
Tera Guru

Routing inbound email is one of those things that should be easy in ServiceNow, but somehow it never is.

 

Any ServiceNow admin living in a world where email is still a means of ticket creation has had the same requests:

 

  • "Can emails to 'fieldsecurity@acme.com' be routed directly to the Field Security group in ServiceNow?"
  • "Can emails from 'event_generator@acme.com' be auto-categorized and automatically resolved?"
  • "Can the emails to my group automatically generate catalog requests instead of incidents?"

 

These are all perfectly reasonable requests and, given how easy most things are in ServiceNow, they should be perfectly doable. However, spend a few hours navigating inbound email actions, debugging your javascript , checking for inbound actions conflicts, and (most fun) ensuring catalog items are generated correctly, and you shan't have much hair left. If you finally do get it right, you then have to schedule a change window to promote the new code from dev to test to production.

 

Stop the madness!

 

To sidestep all of this inconvenience, I built an app called Postmaster that takes the code out of email routing and brings configuration into point-and-click routing rules that can be added/edited/removed right in your production environment. This removes (most) human error from the equation and adds agility to the process of rolling out new email routing rules. This solution is something that I implement at every customer where I deploy ServiceNow, but could never distribute widely. Now, thanks to the magic of ServiceNow Share, I can share this with all of you!

 

Check out the demo video below to see how it works, and visit Postmaster Email Routing on Share if you'd like to try it out in your environment.

 

For the latest supported release, visit Postmaster Email Routing on the ServiceNow Store

 

Enjoy!

 

20 REPLIES 20

Hi BB - I've updated the links in the article to reflect the correct URLs. Thanks!

joshsutton
Kilo Contributor

Hi Ben,



I have got this installed and working great now, but I am having a bit of trouble with assignment groups and it is most likely due to the way we use ServiceNow.   Hoping you can shed some light on this.



We have may clients that email (or will be emailing) for our MSP Incidents which go to a specific group to manage.   What I am trying to do is set a rule for all inbound emails to search the "From" address for specific words or domain names and assign it automatically to this group.   Trouble is there doesn't seem to be anything like that in the conditions list and the closest one, Reply to, doesn't seem to work.   I thought I had it working, but today it doesn't.   Could you shed some light on if this is possible and how to achieve it if it is?



Thanks,


Josh Sutton


Hey Josh - I think you have a few options here. The information you want to trigger on certainly exists in the incoming email record - we just need to figure out the most reliable trigger-point. First of all, it's good to know that the 'User' field on the email record will either:



  1. Contain the 'from' email address, if there is no user associated with that email address in your ServiceNow instance or
  2. Contain the sys_id of the user account associated to that email address in your instance


Also, the 'User ID' field will contain a reference to the User record in the case of #2 above. You could take the combination of those two items with an OR condition to say 'If User contains @userCompany.com OR UserID.company is UserCompany'.



Another option would be to dig into the email headers. You could likely use a filter of 'If Headers contains @userCompany.com' to trigger the assignment.



Ultimately, you'll want to look at some of the incoming customer emails in your sys_email table to see the available fields and the data in them - that will clarify what some of the filter conditions actually mean. Once you sniff out the data you need to trigger on, just build the simplest and most reliable filter possible, and you should be all set!



Let me know if any of that isn't clear, but I think looking at your sys_email records ('System Mailboxes' in the left nav) will clarify your options.


You still have not addressed this statement in the overview.




There does not seem to be a easy way to catch a From address.   We are trying to get our cloud vendors to report outages to us by send in email to our SN instance but if we can't determine who is sending the notice, we can't open a problem ticket.  



If there is any easier way, please let us know or take this tag line off of the opening overview.   Thanks.


Hi William,



I'm sorry you're unhappy with the content of my post. I believe the detail you are referring to is accounted for directly above your reply in this thread:



the 'User' field on the email record will either:


  1. Contain the 'from' email address, if there is no user associated with that email address in your ServiceNow instance or
  2. Contain the sys_id of the user account associated to that email address in your instance


Simply look at the 'User' field of the Email record. It will contain the 'from' email address you need. Based on that, set the values of the resulting record accordingly. I have just tested this on a Helsinki instance, and it works as described. If I am misunderstanding the issue, or if you are seeing different results, please let us know.



The easiest way to determine your options in cases such as this is to look at the 'sys_email' table, find the desired email, and look at the data contained in that record. Anything you see there can be used in your Postmaster rules or Inbound actions.