How to retrieve email received/creation date from email inbound actions?

Iyyappan
Tera Expert

Hi,

I am trying to retrieve email creation/received date for one of our integration using inbound actions. I tried using existing email objects but no luck.

email.headers have date information but easily accessible and the formation and timezone is different, so it hard to go for it.

Any suggestions would be helpful.

Thanks

Iyyappan Mani

1 ACCEPTED SOLUTION

Yes, I took the email created time as workaround. Thanks for your response.

View solution in original post

8 REPLIES 8

Vivek13
Tera Contributor

Hi,

How did you do this? I am trying to use the opened_at time but it differs 

Hi Ankur,

Can you please guide on why below line is not working ?

 

 current.u_reported_date = email.created;

 

i want to replicate email received/created date in our custom field reported date field.

 

Thanks in advance.

Rajesh

Hi,

try this

 current.u_reported_date = new GlideDateTime();

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

Function new GlideDateTime() will give current date//time but we need email created date so that we can get current info.

Please correct me if my understanding is wrong.

Thank You,

Rajesh