dora
April 26, 2019, 1:56am
1
Hello,
I’d like to get the date with “Get Gmail Messages”, but it doesn’t work well.
Get Gmail Messages> For Each> Create in Message Box,
Even if I put Mail.Headers (“ Date ”) in Message Box but it will be blank.
I can take Subject and Body.
Can you please tell me what should I do?
Thank you for in advence!
Hi @dora
Can you please try with Mail.Headers(“Date”). If possible please share workflow to have a look.
Regards,
Vijay.
dora
April 26, 2019, 4:34am
3
Hi @Vijay_Kumar_C
Thank you for your reply. I attached my workflow.
Can you please have a look?
Thanks!
Gmail test.xaml (8.3 KB)
Hi @dora ,
You were almost done buddy…!
Kindly remove the space between the quotes…and add like
mailVar.Headers(“Date”)
Hope this would work…
Cheers
dora
April 26, 2019, 5:11am
5
Thank you for your reply,
unfortunately it doesn’t have the space between the quotes and
in mailVar.Headers(“Date”) case, I get error:(
Buddy…in for each loop the variable is mail
And in assign you have mentioned as
Mailvar…thats why it is showing error…
Change that to mail instead of mailvar and
In for each loop change the Datatype to mailmessages
Cheers…
dora
April 26, 2019, 5:36am
7
Yes, I put mail.Headers(“Date”) and mailmessages in the Datatype but it will be blank in message box.
@dora
Buddy…kindly check the property onlyunreadmessages is enabled in get outlook mail activity…if its enabled, unless u have any unread message you wont get this date…if its enabled…mark any mail in your outlook as unread…or disable that property
Cheers…!
Hi @dora
please have a look at the all headers of mail message. As it is collection you can use string.join to get all items.
Check by default you are getting empty value or not.
Regards,
Vijay.
dora
April 26, 2019, 7:12am
10
Thank you for your reply!
I’m sorry but I tried to do String.Join(“|”,item.Headers) in Write Line but I have an error…
Thanks,
Hi @dora
Please use mail.Headers instead of item.Headers.
Regards,
Vijay.
dora
April 26, 2019, 7:26am
12
OK! and I can get “System.Net.Mime.HeaderCollection”.
Can we get “data” for Gmail?
Hi @dora
My mistake.
Create Counter Variable with int32 data type and assign it value to 0.
Insdie Write line use mail.Headers(Counter).ToString
After that increment Counter value by using assign activity. Counter = Counter + 1 .
This should give all the list of header values.
Regards,
Vijay.
Hey @dora
did you tried with above code. is it working …??
Regards,
Vijay.
dora
April 26, 2019, 8:44pm
15
HI @Vijay_Kumar_C
Sorry for my delay…
I can get something but I don’t know what that is. Please see the below.
Thanks!
Hi @dora
Can you please try with outlook activities. I think in gmail it will be a secure e-mail transmission.
Give a try with Outlook mail to get mail items and try to retrieve headers. If it works then probably you have to change the gmail settings.
Regards,
Vijay.
dora
April 29, 2019, 10:44pm
17
oh OK…I want to get the Date by using Gmail. I intend to find another way!
I’d appreciate if you tell me another way.
Thanks!