Need some information regarding Gmail plugin

Requirement :

  1. Need to check the mail which contains specific string or statement. Mail cpntent can appear at any point of time after some operation in backed. Is there any way to wait till I receive the mail from particular address.?
  2. Once I get the mail, I should get the content and if satisfied then I should delete that particular mail.
    As I may get same kind of mails later, I don’t want to keep in mail box.

Kindly suggest the same.

Thanks and Regards,
Akshata