Inbound Email Action: Setting Field Values from the Email Body where name has a space

jmoreau
Mega Contributor

I am using an inbound action to parse the body of the email.   I have done this fine for strings and where the name of the name/value pair is one word.   However, I am unable to figure out how to parse it when the name is separated by a space.

Two questions:

1) How to parse where name has spaces?

2) How to insert into a Date type field?

Email Example
<Body>

Pricing Effective: 04/11/2017

</Body>

Inbound Action Script

current.u_my_custom_date_field = email.body."Pricing Effective";

1 ACCEPTED SOLUTION

Ignore the previous one.


The Date format should be same as system date format



var mydate = email.body_text.indexOf('Pricing Effective: ');


var gDate = new GlideDate();


gDate.setValue(mydate);


gs.info(gDate);



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

10 REPLIES 10

Ed16
Kilo Explorer

I'm trying to accomplish something similar also, see example attachment below. I'm trying to pull the string value for Attachment SHA256, Category and Condemnation Time so i can insert into a field.

find_real_file.png

Any ideas are welcome.

Thanks,

Ed