I am trying to use a condition of email.subject.contains ("xxxx") on an inboud email action but it doesn't work

donna_mcclung
Kilo Contributor

I can get an inbound action to work with email.subject.startsWith("Single - ") but not contains. I am on Fuji release.

7 REPLIES 7

Hi Donna,



You add add the script that Michael provided in the condition field itself of the inbound action. The inbound action will evaluate the script in that field and if it evaluates to true it will run your inbound action.   The indexOf() function returns the position where "single -" exists within the subject. if it does not exists, it will return -1.



email.subject.toLowerCase().indexOf("single - ") >= 0



Will evaluate to true and run your inbound action if the email subject contains "single -", or will evaluate to false and skip this inbound action if it does not.



Hope this helps.


-Jose


Didn't work but thanks for trying. I am going to wait for my Geneva upgrade since it allows for using the condition filter which is easier to trouble shoot



Donna


aartiaushal
Giga Contributor

I have used below line in condition field . Include brackets as well
(email.subject == 'Create Incident')


It worked for me .