Inbound Email Action - Want just email body comments

Elizabeth26
Tera Contributor

Hi,

I am trying to do an inbound email action to update a field called progress notes with an e-mail reply but the reply only and not include the original e-mail it was replied from.

From researching it looks like I need email.body.comments

I tried this under actions - script

current.progress_notes = email.body.comments;
current.update();

It didn't work but when I did this worked but included the entire e-mail thread. I just want what the REPLY is.

current.ait_progress_notes = email.body_text;
current.update();

 

Thank You!

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hello,

Unfortunately, there isn't a universal "email.body.comments" as a normal email object accessible. Please refer to documentation regarding the available objects with variables: https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/notification/reference/... you're perhaps reading other threads and mistakenly taken that away from those threads. email.body.something...for example is basically looking for that as a prefix within the email and would then capture the text beside it. So if the email said:

"Hi Steve,

how are you?

Details: blah blah blah"

I could use email.body.details in the inbound action script to then grab the "blah blah blah", for example.

For trying to get the latest reply/information only, please check out this thread: https://glassputan.wordpress.com/2012/03/08/managing-email-replies/

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

13 REPLIES 13

What do you mean?

He's saying...don't use email and have the users come in to ServiceNow to leave comments, etc.

Meh...heh...


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Oh okay.. it has to be from inbound email

Pratiksha
Mega Sage
Mega Sage