Inbound Action: How to check which email account an email is coming from?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 06:17 AM
Does anyone know a workaround to check which email account an email is coming from? I want to use this in our inbound email action.
We have more than 10 email accounts in [sys_email_account] and we have a specific use case wherein when an email comes from account A - do action steps 123 and when an email comes from Account B - do action steps 456.
The recipients, to and cc field values are no longer possible because of the known feature of BCC when you don't know who was BCC'ed.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2022 01:51 PM
We are still finding out a solution as I can't find any field/column in [sys_email] table that tells me which email account this email was pulled from.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2022 02:59 PM
I found https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0756080 that provides some interesting information about modifying email headers. It deals with outbound, but I wondered if it's possible to write a new header into an incoming message depending on which account it came from. You could then modify your inbound actions to look at that custom email header. I agree that there isn't a field in sys_email, but maybe there is something that can be done that isn't obvious, like instead of the script having "current.headers" if it allows "current.account" or something similar. I am still researching this but wanted to share my thoughts so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 10:01 AM
We actually asked our Exchange server admins, and they can modify the headers before it gets forwarded to SN, however, IT security didn't allow the option. The other option we tried was look a before insert business rule but it's not there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2022 12:57 AM
Currently there is no guaranteed way of identifying the email account. I have submitted this as an idea a long time ago: https://support.servicenow.com/ideas?id=view_idea&sysparm_idea_id=1af5fae7db9f5410a08a1ea6689619bb&s...
Feel free to upvote.