I am using Get Mail from Office 365 Outlook unread emails, and do some operations for each email retrieved. I am using ReFramework, and each email is a transaction item.
What I want to do is, if processing an email is successful, mark that email as Read on Outlook, and if processing an email failed, leave that email as Unread on Outlook.
Is this even possible?
I unchecked “MarkAsRead” checkbox for Get Mail activity.
“MarkAsRead” checkbox for Get Mail activity will mark the email to Read as soon as it is read by getoutlook activity.
I can suggest an alternative here.
- we can create 2 Folders under Inbox - New and Processed.
- Have a Rule in Outlook - when ever the mail arrives with desiganted subject / sender - Move the Mails to New Folder.
- In Uipath - For Proessing - I read the Emials from the New Folder - Irrespective of the Read/unread status.
4.Process each mail - If Succes - Move Email to Processed Folder using Move mail activity.
- If fails - It remains in New fodler.
Thank you. There seeming to be no way to mark certain mails unread and certain mains read, separating the inbox folders might be the only way.
So, how can you specify the mail to move to “Processed” folder? Does inputting the TransactionItem (Office365Message object) in Move Mail activity actually move the corresponding mail to the specified folder?
Yes , Move Mail Activity expects the Folder to Move the Email and MailMessage Object.
There is another way, though it’s less than ideal.
When you first fetch all of your mail messages, leave them unread. As you iterate over the messages, you can once again use the Get Mail activity, this time marking the results as “Read,” and only searching for the subject that is the same as the message you are currently working on.