Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

Mark email as unread

Hi all, I have one process in which I have Retrieve Email action. This action reads only unread emails, also action has enabled mark email as read after executing. What if my process fails, how can I return status od email to unread? so if this process starts again he will try to process this email again.

 

Or I can set some action to mark this email as read on the end of the process.

 

Do you have some idea how can I do that?

 

 

Thanks!

Matej


Best Answer

Hello Matej,

There are a few ways to tackle the issue you mention.


One of these, as you mention in your message, is to only set the emails as read after the rest of the process has already completed. However, since you will have to use the Retrieve Emails action again, this method would waste time if there are many emails to read.


Another way to handle this situation is to make use of the Exception Handling capabilities of our software. More specifically, you could create a new function in your process, which uses the Process Emails action in order to set the retrieved emails as unread again. Then, you could use the Exception Handling tab of the action that crashes, or an Exception Block, in order to call the "Mark as Unread" function whenever an exception is encountered.


ADMIN
Answer

Hello Matej,

There are a few ways to tackle the issue you mention.


One of these, as you mention in your message, is to only set the emails as read after the rest of the process has already completed. However, since you will have to use the Retrieve Emails action again, this method would waste time if there are many emails to read.


Another way to handle this situation is to make use of the Exception Handling capabilities of our software. More specifically, you could create a new function in your process, which uses the Process Emails action in order to set the retrieved emails as unread again. Then, you could use the Exception Handling tab of the action that crashes, or an Exception Block, in order to call the "Mark as Unread" function whenever an exception is encountered.


1 person likes this
ADMIN

Hello Matej!


An alternative solution would be the following.


Leave the "Mark as Read" box unchecked in the "Retrieve Emails" action and after finishing the processing of each email simply move it to another folder using the "Process Emails" action. This way the Inbox folder will only contain emails that require processing and those emails will be marked as Unread so that if the process needs to be restarted it will retrieve and process them.


I hope the above makes sense.


1 person likes this
Login or Signup to post a comment