Email automation sends targeted and personalized emails to a specific audience at predetermined times using software tools. UiPath provides robust email automation capabilities that can help businesses streamline their email communication processes, reduce manual effort, and improve the efficiency of their workflows. Email automation using UiPath helps you to create automated workflows. So that you can send, receive, and process emails based on specific triggers and rules. With UiPath’s email automation, you can:

  • Send automated emails
  • Receive and process incoming emails
  • Integrate with email platforms
  • Monitor email inboxes

Steps in extracting table data from Outlook to Excel

Step 1. Go to UiPath studio, click Manage Package, and search for UiPath.Mail.Activities, and install it.

email automation

Step 2. Under Activities, search for Get Outlook Mail Messages and drag and drop it.

Step 3. Go to Properties, and mention “Inbox” in the Input as the mail is in the Inbox.

extract outlook table data to excel

Note: Uncheck if there is any checked box in properties.

Step 4. In the Properties, go to Input, and set the variable as MailMessages.

Step 5. Go to Activities and drag and drop the For Each activity.

Step 6. In the box under ForEach, type email and MailMessages under the box In.


Step 7. Drag and drop Save Outlook Mail Message activity from Activities. Fill the boxes as given below.

  • Mailemail
  • Save to folder – “Path where you want to save”.
  • Save as type – Select MHT(*.mht)
  • Check the box of Replace existing

Step 8. Drag and drop the Assign activity. Set the variable as EmailFiles, and select the Variable type as Array of [T]. Fill in another part as Directory.GetFiles(Path As String) As String().


Step 9. Drag and drop For Each activity, fill In with the string EmailFiles and ForEach with emailFile.

Note: Go to Extensions of .mht file and enable Allow access to file URLs

Step 10. Drag and drop the Start Process activity, and type emailFile. And you have to open this file and do data scraping. For that, first, run the file from Debug File. Now the email is saved in the previous path.

Robotic Process Automation

Step 11. Open the mail in Outlook.

Step 12. Click on the Data Scrapping icon in the UiPath studio.

Step 13 Click Next on the dialogue box that appears.

Step 14. Select one of the cells and click Yes on the dialogue box that appears.

Email automation using UiPath

Step 15. Click on Finish.
Step 16. Click No in the dialogue box if there are no multiple pages.

Note: Uncheck ContinueOnError under Common in Properties.

Step 17. Drag and drop Write Range activity. Fill the Workbook path as “ExcelData.xlsx”, Sheet Name as “Sheet1” or any, Data table as ExtractDataTable.

Email Automation

Step 18. Drag and drop the Close Tab activity.

Step 19. Close the .mht file from Outlook.

Step 20. Save and Run.

Step 21. Go to the saved folder and open the Excel file. There you can see the extracted table.


Email automation using UiPath helps you automate tasks such as sending and receiving emails, extracting data from emails, and exporting data to Excel. UiPath can also integrate with popular email platforms such as Microsoft Outlook, Gmail, and Exchange Server, allowing users to automate email communication without manual intervention.

The expert team of Metclouds Technologies will help you with email automation using UiPath.