UiPath - How to read Outlook Mails and save them to Excel

preview_player
Показать описание
This guide shows you, how to read Outlook Mail Messages (including attachments) and save them to Excel in UiPath.

You could also watch:

00:35 Get Outlook Mail Messages Activity
We use the activity Get Outlook Mail Messages to get the mails from our Outlook to a list of mail messages. Do remember to specify the Account and MailFolder.

02:05 For Each
Use a For Each activity to iterate through our list of mail messages. Remember to change the TypeArgument.

03:00 Read the date of the email with VB .NET

03:42 Get the sender of the Mail
Similarly we can get the sender and subject of the mail with VB .NET

04:30 Save the Outlook Mails to Excel
We can very easily save the Outlook emails to Excel with UiPath

05:18 Build Data Table
Build a Data Table and put in the column headers (e.g. ID, Date and Subject) you need in Excel.

06:50 Multiple Assign
Using the multiple assign instead of several single ones will help keep your workflow clean 😊

09:00 Add Data Row
We add a Data Row and specify an array with the data and the Data Table name.

10:20 Write Range
In order to write the data back to Excel we use a Write Range.

12:02 Save Attachment
Additionally we can save the attachments of the Outlook emails to a folder.

13:23 What if two attachments got the same name?
We could run into a problem, if two attachments have the same name. Then we create a dynamic name using the date and time.

13:50 Create a Folder
How to create folder in UiPath, where we can save the attachments.

15:25 Does the mail contains an attachment? Check with .net

Connect with me:

#uipath #rpa #automation
Рекомендации по теме
Комментарии
Автор

Very systematically explained. Please if possible also suggest how to get the mail body as well.

mailanuraggoyal
Автор

Thank you so much sir! Your explanation is very good, keep up the great work ! :)

remixowlz
Автор

Hi Anders, i want to extract the details of the phishing emails which are saved into a folder with eml extension. How should i do that because if i create a folder in my outlook and move the phishing emails to that new folder, then nothing gets extracted but if i give any other folder emails then those emails get extracted into an excel.
It would be great if you could help me !!!!

baijayantimalanayak
Автор

Hi Anders, sorry its me again, I noticed that the date i got from your video class is just the "From date" on the email body. I am trying to estimate how long it takes for msg's in the box to be fully answered so i need both dates eg when the mail was received and when the response was given, so i need to be able to extract both "From" and "To" dates on the mail. I also noticed the "UID" doesn't appear to be the actual msg-ID, I was hoping to use the "UID" as a key for both "From" and "To" on the message to establish the link between the msg's but they are not related. I thought i could take a specific subject on one of the emails that are related and verify the relation with the "UID" but the "UID" doesn't seem related so i cannot use that as an option to aggregate the msg's

jeffrey
Автор

hi anders i love your videos i just want to ask if i have a section in outlook with different emails of same format but different format how do i extract the information inside the email

owgjunxian
Автор

Thank you for your good explanation. Can the robot enter in a mailbox not mine but another mailbox?Because I received always an error, in mine never error

scuolaperfezpnl
Автор

Hi Anders,
I could create this project with no problem, cause you made it so easy and I appreciate that, but when I'm trying to do it on a remote machine, "Get Outlook Mail Messages: The specified folder does not exist" comes up. I switched focus to the Outlook on remote machine by making a basic recording, something else should I do? Thanks in advance.

griiiinless
Автор

Hi Anders, thank you for the tutorial, its very helpful.
I have two questions, 1) how do I access the subfolders on an inbox instead of the main inbox, I tried using the subfolder name instead of the inbox name and had an error, it did not recognise the subfolder name.
2)I need to analyse emails in a shared inbox and i believe every email has a tag so even if it is replied to multiple times keeps the same tag or sort of email id from outlook. I want to create an analysis to see how effective we are responding to emails and how long it took of a particular email to be dealt with, where can i find this outlook id or tags relating to a particular mail.
Thanks

jeffrey
Автор

Hi Anders, I like your videos, I've only just started learning UiPath, I have a key question that I'm trying to solve. I need to rename my files with a date string. The specific problem I have is downloading from Outlook (like in your 14 min video on the subject) and then saving to a folder, I was able to create individual folders (as you showed) but I need to save all of them in the same folder and give each download a name with a date string appended to the end. Make sense? Thank you for your videos they are great!

cyrus
Автор

Hi, Anders jensen
I have a problem related to extraction of mail message form outlook
when i execute a Get outlook message" activity and use a message box
it shows a message "[UiPath Community Forum] Summary". I able to understand why this shows to me can you please regarding this problem.
Thanks

SumitSingh-cgqc
Автор

Followed everything minutely but on Run with write line Date activity got the error message saying = Write Line: Object reference not set to an instance of an object. could not solve

FazlulHaque
Автор

How to read body of first unread email from email thread to excel ? I followed one of your video and successful in reading email body to excel, now am struggling to read only first email and don’t want the entire thread to be copied to excel. Is regex suggestible in this case?

divyatirunagari
Автор

How to extract specific data from the body of the mail and I want to use for multiple mails

Montu
Автор

Hi.. THanks for the video. I just wanted to know how can I copy a table from email body to ta excel

MrShoumen
Автор

Hello sir can you help how to read Email atach document under particular text

sameermore
Автор

Hi, Anders
I get all images which are in mail body for example under signature as attachments. How could I avoid theses?
Thanks,
Bahadar khan

bahadarkhan
Автор

Hi Anders, great video! How would the file path to a subfolder in Outlook look like? For example, in my Inbox, I have Invoices folder and within Invoices folder, I have New folder. Would the folder path be "Inbox\Invoices\New"? I tried it and it's not working, so I'm wondering if the MailFolder path needs to be in a different format

andrewandrew
Автор

hello Anders, how can i get the particular data from the body of the mail

kratirajoriya
Автор

Hello, Andres please help I am trying to get a mail body I get a null value I use item.body.tostring
I get null if I use item.header("Html Body").tostring for this expression I get the mail body and it in Html I need to extract only body how to do? Please help me I hope I will get a solution from You

itsmechethan
Автор

Very good turturial! But how do I sort out the mails and there possible PDF attachments with keywords stored in 2 CSV files?

mariposa