UiPath | How to Download Attachments from Outlook and save them dynamically | Tutorial

preview_player
Показать описание
Learn how to download attachments from Outlook with UiPath. This very easy guide shows you how to. Afterwards we show the solution to the problem, if the attachments are named the same and how we then save them without overwriting.

You could also watch:

00:36 Get Outlook Mail Message
We get the desired amount of Outlook Mail Messages and store them into a list of mailmessages.

00:40 Mail Account Property
It's always best practice to specify the mail account to make sure, we don't accidentally look in another mail account at the computer.

01:06 Mail Folder
Remember to specify what Outlook folder to look in. Default is Inbox.

01:57 Save Attachments
Use the Save Attachments activity to save attachments.

02:08 For Each
We iterate through our list of mails. And then save the attachments.

02:25 Setting the TypeArgument in For Each
Remember to set our TypeArgument to System.Net.Mails.

03:55 Problem with Attachments with the same name
Solve for the problem with attachment with similar name (create unique file names for the attachments).

05:18 How to get the date of the mail and use it as an ID
We create unique file names by using the date of the mail.

07:18 Using DateTime

10:25 Use an If to check if the got any attachments

11:05 Create Folder

Connect with me:

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

Great job Anders. This video is very much helpful. Thanks!

mariaaden
Автор

thanks a lot are helping me in solving many issues

akhilg
Автор

Thank You for the sharing, It is very clear and helpful.

vincentchu
Автор

Thanks very much for your effort! and the clear and useful!

MRGRANDE
Автор

In case your Item.Header returns date time format like this "Tue, 08 Nov 2022 19:34:51 +0800", you can try using >>>> <<<< instead of the DateTime.ParseExact method described in 07:30 in the video. I tried using DateTime.ParseExact, but my problem was in the +0800 time zone whereby somehow I cant get the +08:00 to appear +0800 without the colon. The "CDate" method worked for me.

alanchen
Автор

string was not recognized as a valid datetime
Anders, I'm getting this error. How to overcome this

sanjaykarthik
Автор

HELP ME!!

after I run I get errors like this

Message: String 'Wed, 21 Dec 2022 20:59:23 +0700' was not recognized as a valid DateTime.
Exception Type: System.FormatException

_wahyuhidayatsiregar
Автор

Hi Anders
Thank you so much, it is so helpful.

griiiinless
Автор

Hi Anders, how can I change the date format? 5:43 this is my Format "Wed, 19 Jan 2022 08:36:34 +0100" and i want to keep it simple as possible. Thanks for your grate videos and best regards from Munich!

Gin_Tonic_No
Автор

Hi Anders,

If I have to download mail attachment from outlook, if it has attachment.. to a particular location, otherwise I have to download the mail itself if no attachment are present, to another particular location..

And the mail and attachment to be downloaded by bot from outlook mailbox should be less than one day that of current date (system date)...(read and download mail and attachment which has come yesterday not today)

and mail should be saved with the subject+date and time inside the mail...
Can you guide me with one sample video along with link.... It would be very grateful

MrAnupam
Автор

Really helpful video. What if similar attachment files (mails.xlsx) is in a single email?

mpawar
Автор

Hi Anders! I dont know what is happening here. My one is showing, the operation has timed out. What should do?

mohammadrezwanurrahman
Автор

The automation is running fine, but no attachment is saved. What I should do please?

a.sacerdotisa.
Автор

Hello Anders. I have a file to download from Outlook, however, the name is more than 50 characters long. UiPath does not recognize it as an attachment to save it to a folder. When I reduce the filename to 50 characters, UiPath is able to save it to a folder. The file name is coded a special way for another system, and needs to remain its original character length. Can I extend the character limit? Is there another alternative besides truncating the file name? Thank you, in advance. I really enjoy your videos. They are very detailed and informative.

antoinewilliams
Автор

What are the supported attachment types for Safe attachments in MDO . Kindly help.

KundanKumar-fbch
Автор

Hi Anders, thanks for your video i'm a RPA beginner, how can i do to save multiple attachements with the same name without overwrite ? Best regards.

arnaudpinciroli
Автор

I have experienced a big problem....The Specific folder does not exist....I dont know how to fix this. Can you help me?

wagnermacedo
Автор

Hi Anders!
Would you tell me how to unzip files? I got an extension but for some reason it disappear next time i use Uipath.
Thank you!
Manuel.

manuelcaballero
Автор

My mail datetime comes in this string "Thu, 31 Mar 2022 17:33:06 -0300" and I have 0 idea of how to parseExact this monstruosity.

XiroNyakuya
Автор

Hello, First thanks for the Video. I've a question: How to get the Attachements names? I want to open it after the download if it a ".xls Data". Thank you.

vnPride