I want to check if the data in Body in Outlook whether it matches the data in a column in excel. What should I do?

I want to check if the data in the Body in Outlook matches the data in the “Change ID*+” column, and if so, Fill in the “Check In” column with the word “in”.

Outlook

Excel
1

Process I want

Best Regrads

Hi @Famui_Yanisa ,
I see the body has only 1 data, that means you need to read many mails right
please use read mail to get data
read excel file to get excel data
loop to check if match
if row(“Change ID*+”)toString = “value in Email”
assign row“Check In” = “in”
Regards,
LNV

@Famui_Yanisa

You perform a lopp on the excel rows or the datatable read from excel and then check using if condition

mail.body.Contains(currentRow("Changed ID*+").ToString)

cheers

Hi,
You can flow step
1.read excel file
image

2.Get mail

3.use for each mail
in loop for each row to compare body mail and excel data in Change ID*

Assign value for Check
Write back to excel file

Hope it help you
Regards,
LNV

Sorry , but I tried and it shows this message
"Write Range Workbook: An item with the same key has already been added. Key: "
Does your file show results? Can I bother you to see your file? :cry:

1 Like

Hi @Famui_Yanisa ,
こんにちは,
Sorry to reply so late
*My input
-my excel
image
-my email test

*My code

*My output

*My file
checkin.xlsx (61.6 KB)

compare_mail_excel.xaml (20.7 KB)

I hope it will help you
If you have error, send me inbox, I will help you
:grinning:
Regards,
LNV

1 Like

Hi @Famui_Yanisa ,
I updated and send inbox to you
My code:


image


compare_mail_excel.xaml (21.9 KB)
My input
checkin.xlsx (8.6 KB)

My output

Regards,
LNV

1 Like

Thank you very much .I’m trying it out :heart_eyes:

1 Like

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