OnlyUnreadMessages Issue

Hi All, i have scenario here, where i am reading only Unread MailMessages with a particular subject line using “Get IMAP Mail Message” activity, here one time i am reading only one mail(top most) from the Inbox and processing it and i am marking it as read, after certain period(30-50 sec) if there is any unread mails with that subject line i have to read and process it and if there is no unread mails BOT has to be wait for certain period(30 min).

For me all above scenarios working properly except one i.e when there is multiple mails with same subject line my BOT reading the last mail multiple times(Infinite) even if the mail is marked as read.

Kindly help me on this.

Send the screenshot of workflow.


Hi @hasib08 please find the workflow screenshot.

Hi @Siddu

How do you read the mails? What is there in Read Mail from Gmail sequence?

@hasib08 i am using if activity to check subject line,

for more info please refer the attached screenshot.

i am using one variable in then and else part, if subject line true variable set to true else it set to false.


@aanandsanraj please refer above screenshot.

Your code looks good and it should stop once the list of mail looped. Did you debug it?

1 Like

Thanks, @aanandsanraj ya i did, the BOT still reading the last mail, even though it is marked as read.
One more info, think that multiple read mails already there in the inbox with required subject line, that time if i trigger the BOT means control will goes to else part and it will wait for some time, because mails already read. But when there are multiple mails with required subject line BOT will read the mail one after the other, but issue is only last mail processing multiple times even if it is marked as read.

Hope got my point.


Hi, i got the solution @aanandsanraj @hasib08

Thank you

1 Like