Mark Email as Read only for specific subject

I am reading Gmail messages with GetIMAP activity. I select ‘MarkAsRead’ and ‘OnlyUnReadMessages’ checkboxes in Properties panel. By selecting ‘MarkAsRead’ it marks all the messages as Read. I want to mark only those mails as Read only if they contain specific subject. How do I do this?

You need to mark email as read after filtering by subject, not at the time of fetching. You can use a custom activity to mark only particular emails as read.

Alternatively, you can move them all to a subfolder and mark them read there and move them back.

Could you please specify an example of “a custom activity” for marking a particular email as read? This is what I am looking for.
Thank you!

Can you please explain in details?How to use custom activity