I’m facing an issue where the BOT fails to move emails to the “Success” folder in a shared mailbox after processing a large volume of messages. It works as expected for approximately 70 emails, but after that, it throws a system exception during the “Move Outlook Mail Message” activity with the following error:
“The specified folder doesn’t exist.”
The process itself is quite straightforward:
The BOT retrieves emails from Outlook
Downloads any attachments and saves them locally
If attachments are present, the emails are moved to the BOT’s “Success” folder
This issue seems to occur only after handling a large batch of emails.
Could anyone please help identify the cause or suggest a solution or workaround?
If yes - easiest option would be to split the process in to different batches.
Example- batch of 50. If attachment found - moved to success folder. else move to processed folder
repeat the same for other batches as well. Point is - Since you are stopping the process after each batch - run time memory will be reset so that it wont create issue for each batch
Nope. Wait wont work. You should stop the process or it should complete after a batch of 50. Start again
Since you are moving the emails everytime - it wont process the same email. Only point is to keep a counter and complete the process if the counter value is greater than 50 or whichever you configure
You need to run the process multiple times to complete the backlog
the error happens because outlook loses connection to the folder after processing many emails.
So try add a retry or delay before moving emails, restart the outlook session after every 40/50 emails, and process emails in smaller batches.
If helpful, mark as solution. Happy automation with UiPath!
Kindly clarify whether this activity is one time or not.
memory issue will be there if you are giving load for a longer time. If the system is getting crashed frequently - This would be a method to avoid the failure. efficiency - If you could find a solution which could run in one shot - That would be the best option
In my older project - I have splitted and ran multiple times which helped me to achieve
Sorry, I didn’t understand what you meant by whether the activity is a one-time task or not.
This process retrieves all email messages, downloads their attachments, and saves them locally. If successful, the attachments are then moved to a ‘Success’ folder in Outlook.