How do i set an inbound action condition for FROM email address

reachjake
Kilo Contributor

How do I set an inbound action condition for FROM email address. The email belongs to an external service and not a servicenow user. When i put something in the From field of the inbound action I get an "invalid reference" error as that field expects a user

What is the best way to do this?

Thank you

7 REPLIES 7

Thought to add extra note found in the docs which would helpful.

email.from
Contains an email address that depends on the following conditions:

* If the address listed in the email Headers field  matches an existing user's Email address, this variable contains the user's email address.

* If the address listed in the email Headers field does not match an existing user's Email address, this  variable contains the address listed in the email Headers field.

I tried this, but it did not work 😞 am I missing something?

 

email.subject.indexOf("Oracle Account Responsibilities Change Request") == 0 && email.from == 'charmaine.benico@emerson.com'

You may try this. There are cases where email.from could contain uppercase letters.

 

email.from.toLowerCase() == 'test@email.com';