I want to check all mails in Inbox and if nothing is found I want to send only one message

I have a working code that checks all unread emails in “Inbox” and if there is a “subject” that I need it does something, but if there is not a “subject” that I need RPA sends as many emails as there are unread.

Im using “for each” and “If” statement and in “else” i have RPA to send an email,so I know why it does that but how can I bypass that.

So I need to check all unread emails and if the subject is not found send only one email to the user"Mail not found"

Righ now he sends as many emails as there are unread

Thank you

Hi @Flip_Flop

This may happen due to wrong placement of else condition for the subject match but before coming to any conclusion, it would be more helpful to find the cause if you can provide the workflow too.

Regards

Rajat