I have a process that can result in either of the 2 workflows:
Success: Move mail message to shared mailbox subfolder (INVOICES\Processed)
Reject: Edit email subject with Reject Reason and move mail message to shared mailbox subfolder (INVOICES\Rejected by Bot)
I have also tried moving the mail message first and then editing the email subject, but the error outcome is the same.
The Success workflow works 99% of the time.
The Reject workflow works 5% of the time.
The issue I am encountering is that sometimes the Reject workflow:
will work for one or two emails and then it will stop working
not work at all
The error that comes up is either one of these (it is not consistently the same single error):
Move Outlook Mail Message: The specified folder does not exist
Change outlook mail subject: The operation failed.
I am using Alphabet.Workflow.Activities (v 3.1.0) to change outlook mail subject and UiPath.Mail.Activities (v 1.7.2) to move the Outlook mail message.
Any help with making the Reject workflow work reliably is appreciated!
I came up with a kind of strange solution. While the process is renaming the subject, outlook needs to be open. After renaming when it comes to move the mail to subfolder it only seems to be working with multiple mails when outlook is closed.
So what I did now is that in a first loop the bot is searching in the attachment of mail for a certain string if found he changes the subject of the mail. At the end he is closing outlook.
Then in the next loop the bot, according to the changes made before, is moving the mails to specific subfolders.