Mark Mail As Read Only After A Condition is Fulfilled

email
activities

#1

I am creating an automation to read all the unread mails, and check them if they contains any word “some keywords” in the body or subject, and then copy the body in a text file.

I want then, only if “some keywords” is found (hence the message content is copied to a text file), I want the mail is marked as read. (This makes Get IMAP Mail Message with Mark As Read checked is improper). Anyone know how to do this?

Notes: I am using IMAP in this mail processing.


#2

Have you found any solution for this…??


#3

@Divyashreem I wish I had, but not, not yet.


#4

i am also looking out for a solution


#5

@lawanyaram @Divyashreem @whyyouandi Hey guys have you come across any solution for this?

Thanks
Joshi


#6

@Joshikumarav Have you got solution?


#7

we created the customer activity for this


#8

customer activity? Could you share the overall idea?

@indra I did a lot of readup. But UiPath doesn’t allow any capability to do this. The System.Net.Mail.MailMessage that UiPath uses to read message doesn’t have an Unread property to set back to false.

The approach i used is as below. Not the best. But does the purpose. So the idea is, we are already in the for each loop. so we only have that item. Once all my conditions are met, I move it to a different folder (still unread) and now I use get outlook mail activity again, move the message back to the inbox and mark it read. I felt this was effective than calling vb scripts for outlook process.

But i am open to improve the process if people have other views.