How do I store the time the mail was received for a row in Excel with content matching BodyMail?

I received an email with the content “ID*+”.
I want to store the date and time of received mail in excel.
what do i do Keep the date and time the email was received in column D (Date/Time) corresponding to the content of the email. address in column B (ID*+")

My Outlook
InkedInkediiii

My UiPath


DateTime

My Excel

Hi @Famui_Yanisa ,
Same as yesterday body mail comparison I did, this also compares the same,
for each get body mail and receive time
compare with ID* with body mail, if match, reassign
wait a minute, I’ll help you test
Regards
LNV

1 Like

Hello @Famui_Yanisa

  1. Receive Email:
  • Use “Get Outlook Mail Messages” or “Get IMAP Mail Messages” to retrieve emails. Store in mailMessages.
  1. Loop and Process:
  • For each mail in mailMessages:
    • If mail.Subject contains “ID*+”:
      • Add a row to dataTable with {mail.Subject, mail.ReceivedTime, mail.From.Address}.
  1. Write to Excel:
  • Use “Excel Application Scope”:
    • Use “Write Range” to write dataTable into Excel.

Thanks & Cheers!!!

1 Like

Thank you very much for yesterday I want to keep them in the same file. with this pattern So I’m a little confused. :sweat_smile:

HI @Famui_Yanisa san,
I tested it,
We got the body the other day and the time to receive the mail
mailtime.xlsx (46.1 KB)

body and time mail.xaml (12.7 KB)

Today I will compare the obtained time and body with the ID* code in the checkin file
checkin.xlsx (8.6 KB)
compareTime_Body.xaml (16.4 KB)

We can completely gather the comparison logic and populate this information in a loop.
like yesterday, enter “IN” in checkin and now it’s time to receive and Date/Time
Reply if you need me edit It
Regards,
LNV

1 Like

But if I want to modify the datetime data according to dd/mm/yy hh:mm:ss format, where do I need to modify it?

Hi @Famui_Yanisa san,
In step get time
image
change
mail.Headers(“Date”).ToString

by
mail.Headers(“Date”).ToString(“dd/MM/yy HH:mm:ss”)

Regards,
LNV

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.