Best way to have an Inbound Email Action that allows for multiple recipients

Kristian Maiora
Tera Contributor

We have Inbound Email Actions for (among other things) creating Cases in our HRSD environment. We have one rule that runs when:

Recipient contains hr@testorg.com

And it creates an HRC for the general HR assignment group. We have another rule that runs when:

Recipient contains payroll@testorg.com

And it creates an HRC in the Payroll assignment group.

Today we received an email to payroll@testorg.com with individuals also on the recipient list, however no other group email. The rule that ran was for the HR assignment group case. Looking at it more, one of the usernames on the payroll@testorg.com email is blihr, so their email is blihr@testorg.com. Technically that contains hr@testorg.com, which is why it triggered the HR assignment group rule and not the Payroll one.

 

I'm sure I could change the order the rules run and have the Payroll one before the HR one, but is there a better way to solve for this? I know that using Recipient is hr@testorg.com wouldn't run if additional addresses are on the email list, so I would love to hear some thoughts, feedback, and maybe a solution.

 

Thanks,

Kristian

5 REPLIES 5

Kristian Maiora
Tera Contributor

Apologies. I likely should have posted this in SysAdmin. I just posted it there and tried to delete this post but cannot.

jMarshal
Mega Sage
Mega Sage

Have you considered using an Email Flow instead of an Inbound Email Action? You may get better results: Inbound Email and Flows | ServiceNow Developer

I believe the way to do this with an Inbound Email Action would be to have it action a script which will manually do the insert to each table...the script would have to trigger on both/either of the emails inbound and then analyze if the other also exists in the recipient field...and then take appropriate action (insert record to one table or the other or both).

Email Flows are developed in Flow Designer, so it is much easier to set up (GUI).

I do not believe there is a feature in platform which will do what you're looking for as a configuration (no code). 

Came here to suggest exactly this. The flow UI is a lot easier to understand.

Good to know. I haven't used Inbound Email flows before, so I will review this with the team and see what we can come up with. Thank you both!