How to read emails from gmail and mark them as read after that give them unread status again?

Hi. I am using Get IMAP Mail Messages activity to read emails only from some specific senders and mark them as read, but the emails from other senders must stay unread. How can I do that? Any ideas?

Thank you.

hi,
Suggests below steps,
1.Read all unread mails -do not mark them as read
2.do processing and filter mail that you want to mark as read Get unique identifier from mail such as sender ,subject (use combination for better results).get these in datatable
3.now loop datatable , use read mails activity with read mail option true and use unique filter