Having trouble running my first automation- Saving email Attachments

Hi, I just started my courses with UI path and I think I followed the video well explaining how to create this simple UI path automation to save email attachments. However, when I run the process in debug mode nothing happens.

I am not sure what I did wrong. I downloaded the demo file and that also doesn’t pull the emails. I do have the emails in my inbox.

Please help?

Hi @don.lewis
Please show the “Get Outlook Mail Message” activity properties.

In Log message you using “CourseEmails.Count” remove quotes. To show count of mails.
Give like This: CourseEmails.Count+“mail messages have been retrieved”

Hi @don.lewis, welcome to the Community.

First, make sure that you have attachments in the mails that you are trying to fetch through the automation process. If you are sure that there are attachments available, you can put a toggle breakpoint on the For Each activity & check whether the attachment count is being reflected in the process or not.

You can debug the process & check for the same in the immediate window, like this:

Then you can place an If condition to check whether the currentMail.Attachments.Count>0 and proceed only if the count is greater than 0.

Hope this helps,
Best Regards.

I got it to work by changing the filter line in the get outlook mail message window: “[Subject] = ‘Course Invoices’” instead of “Course Invoices”

1 Like