how can i check particular string in body of email inbound email action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2016 12:37 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2016 12:50 AM
You can use-
current.email.body_text.indexOf("Certified")>-1
to check whether the email body contains word "Certified" or not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2016 03:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2016 04:29 AM
email.subject.startsWith("chg:")
Above line I found in Serviceow Wiki.
is there any way which check for contains in email body
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2016 04:36 AM
email.body_text should work. Its working in my personal instance.
Can you please paste the code you have written ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2016 04:43 AM
Here I am attaching the snapshot.
I am applying the line of code in the condition.
according to condition when email body contains the word certified then it should set the status field.
But it is working for all reply emails. Even email body doesn't contain the certified word