how can i check particular string in body of email inbound email action

Pradeep J
Kilo Guru

Hi All,

I am using the below line to check the particular word is present in the body of email.

email.body.contain("Certified")

if Certified word is present then i need to update the status as Certified.

Am I using the correct keywords ? If not please help

Thanks

Pradeep D J

18 REPLIES 18

souren
Kilo Contributor

Hello Pradeep,



You can try this script like:



if(email.body.toLowerCase().indexOf("certified") != -1)



it means "certified" word has a valid array index and need to use "Certified" in lowercase like "certified".



Regards,


Souren


Condition is not working


souren
Kilo Contributor

Try 'body_text' instead of 'body' as suggested by Manoj.


No Luck