Move downloaded file from Outlook

Hey everybody!

I created a process that can download an attachment of an email from Outlook which works. But now I want to move that file with the move file activity. The problem is that the activity doesn’t know which file I mean because it has to be downloaded. In Get Outlook Message I have the output “mail” and in my For Each loop I have for each item in mail and in the loop the activity save attachments item and the directory where I want to save the file. So how can I move the file I downloaded from the mail? Does anybody have an idea?

Best regards and stay healthy

After saving attachments for a email use Directory.Getfiles(defaultFoldername) in foreach to fetch the file name with fullPath, then in that foreach use move file activity to move your destination folder.

Is it possible to show me maybe a screenshot of the code? I couldn’t do it since I’m new to UiPath :sweat_smile:

I just made a simple flow. hope this helps you

Thank you for the reply.
In the move file activity you have in To “newFolder” would that be just the name of the new folder in its directory?

Here is my workflow:
image

Before the for each loop I create a folder which is mentioned in the save attachments activity. Then I wanted to move the downloaded file which is in the created folder to an already existing folder.
The error says: The value of the type “System.Net.Mail.MailMessage” can not be converted to “String”.
Do you have an idea?