Save Attachments - MicrosoftOffice365

I am reading the mail with ‘Get Newest Email’ and then I get the attachments from it (a collection of attachments) with “Download Email Attachments”. How can I save those attachments into a local folder?

Hi @ext-o

Instead of using save attachments activity use the Save Email Attachments activity, in this activity you can specify the folder path where you want to save the files.
image

If you want to use only Save Attachments activity, Open the properties and give the folder path in the Folder Path field.
image

Hope it helps!!

Hi @ext-o

Use this below code in save attachments activity,

CType(mailMessages(0),System.Net.Mail.MailMessage)

Where - mailMessages(0) is of type UiPath.MicrosoftOffice365.Models.Office365Message

Find the below screenshot,

Hope it helps!!
Regards,

Download Email Attachments has the output: Downloaded attachments list which is of Datatype:
O356AttachmentLocalItem()

It will download it and within a for each you can loop over the output and can use:
yourLoopVar.Localpath to retrieve the path and to move it to the location of your choice e.g. with a Copy File activity

Kindly note: we do have acitivities which are not for the usage with the O356 Blocks and should not try to mixing it up

1 Like

This is it what I was looking for, superb! Thank you <3

Perfect, so the topic can be closed
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum