Outlook Does Not "See" Attachment

Hello Community!

I have a sequence where I Get Outlook Messages

For Each mail in mailMsgs I use write line to write the subject line in output panel and it works
Properties- system.net.mail.mailmessage

Inside the For Each email I have another For Each
For Each item in mail.attachments
Properties- System.Net.Mail.AttachmentCollection
Inside the body a Save Attachments activity
Save Attachments mail message- mail
folder path- full folder path

I have moved Save Attachments under just the first For Each and it didn’t work.
I have counted the attachments and it doesn’t find anything. As far as the automation is concerned there are no attachments. I have only unread messages and other boxes unchecked in the get email.

Please help.

Thank you!

@Jessica_Moseley You have to move the Save Attachments activity in the inner for each loop activity i.e, For Each item in mail.attachments

That is the current location of the Save Attachments activity.

Can you check if mail.Attachments.count value? If its returning a count >0. If it does, then check if the Bot has enough rights to access the save location.

No value. It doesn’t detect an attachment at all. I put an IF statement mail.attachments.count >0 then message boxes for both results and didn’t get any message box.

I am saving to the automation project folder. How can I check if the bot has enough rights to access the save location?

@Jessica_Moseley Try to keep save attachment activity inside the for each loop.

The save attachment activity is inside the for each loop.

Hi @Jessica_Moseley ,

You do not need nested For Each for this.
The following workflow is saving the email attachments. No additional conditions are needed.


Here is the .xaml file: SaveAttachments.xaml (5.8 KB)

Best regards,

I took a look and everything looks the same in my workflow but it still does not save attachments.

@Jessica_Moseley - Please share the screenshot of your workflow for debugging purpose…

Unfortunately, I cannot. I shared all of the activities and properties I have in my workflow and I am happy to share that again or answer any questions.

If it helps, I am using UiPath version 2018.4.6

Hi @Jessica_Moseley ,

Why are you using UiPath version 2018.4.6 and not an updated version?
It seems that this version does not even apper within the UiPath Product Lifecycle list: https://www.uipath.com/legal/trust-and-security/legal-support/product-lifecycle

Did you try to run my previous workflow?
It seems that in the past this issue was quite present: Mail save attachments activity do not work - #14 by libork

Do you even have the latest activity packages?

Best regards,

1 Like

Client policy.

The save attachments activity is not working.

Hi @Jessica_Moseley ,

Thanks for your reply!

If you are using the community version, then I strongly suggest to get the latest version.
New release means that sometimes some bugs are found and fixed

If you are using an enterprise version and, if I was in your place then I would directly contact the UiPath Support (Link). As you can see, there are some similar topics here (e.g. https://forum.uipath.com/t/mail-save-attachments-activity-do-not-work/84979 or https://forum.uipath.com/t/outlook-attachments-not-found/283228), with unfortunately no resolution …

Best regards,

1 Like

@Jessica_Moseley - Please try this…Get Attachments.zip (15.7 KB) . This is without using save attachments activity.

I just ran on my end and it is working perfectly.

Just add your account and run it.

1 Like

The first invoke method errors saying Stream does not have a public instance method named “CopyTo”

Please confirm whether you have this in the parameters??

1 Like