Compare two sheets in excel and copy the data in Word and send an email

I have an Excel with to Sheets- sheet1 and sheet2




I have to compare the both sheets based on the customer name and if the customer in sheet1 present in sheet2 then i have to copy the data of both the sheets of that particular customer and paste in table format in a document - which has a fixed email template and send to the customer.

And for the customer which is not matched with sheet1 has to copy the data into another email template and send to the customer.

This has to be done for each customer.

I have tried to identify the data having those two types and kept in a data table.
Now how to copy this data for each customer and send a mail based on the type 1 or 2.

Is there any other approach for this, please suggest.
Attached the excel and bot.Compare Excel sheets.xlsx (14.0 KB) FilterTableE1 (1).xaml (25.6 KB)

As i have been using the joins here, i’m getting duplictes also.

Expected Result in word document.

Any inputs please? #build #excel