Need Suggestions to Resolve Inbound email Trigger Conflict in flow designer trigger condition

Saranya Babu1
Tera Expert

Hello Team,

 

Could someone suggest a way to resolve the following issue?

We have a requirement where, upon receiving an email, we need to create a normal case in ServiceNow. This is a generic condition for us. However, another team has a different requirement: when they receive an email, it should create an HR case.

Currently, there is a conflict because when an email is received, the first condition always executes.

One possible solution is to add a condition like recipient != "specific email ID". However, this approach requires frequent updates whenever new mailboxes are added, which is not ideal.

Is there a better way to handle this?
Can we use a Script Include function in the trigger condition so that adding conditions can be simplified? Ideally, we could manage this through properties, making it easier to add new email IDs without modifying the logic repeatedly.

Any suggestions or best practices would be greatly appreciated.

Thank you!

 

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Saranya Babu1 

yes you can call script include function from condition field

You will see many OOTB inbound actions doing this

AnkurBawiskar_0-1764063743667.png

AnkurBawiskar_1-1764063767825.png

 

  • You can call script include from condition and create a property to hold the email addresses, then compare and return true/false
  • if condition is true inbound action executed

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes I can see this Inbound email action but flow designer its not working

@Saranya Babu1 

you can't use script include in flow trigger condition if that was your ask

You can create a flow variable of type True/False

Then use "Set Flow Variables" flow logic to set the value

There you can call your script include

Then use IF flow logic and if the flow variable is False -> end the flow

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Saranya Babu1 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader