I need to manage better my email into Gmail. I can receive two possible email messages: one for confirmation and the latter for rejection. A rejection email will come after a previous confirmation.

Basically, when I receive a confirmation email (the term confirmation is enclosed within the email text) I should organize that email in a dedicated folder 'Confirmation' (with a label). When I receive a rejection I should organize the rejection email with rejection label and delete the related confirmation.

The text in bold is the most important part that I don't know how to address.

Is it possible with Gmail, perhaps with a Google script?


Unfortunately, no, you can't do what you want with Gmail filters alone. You can organize the various messages, but there's no way to get Gmail to automatically delete a different email message with a filter.

There may be a third-party add-on that will do something like this, but asking (and answering) questions for recommendations is beyond this site's scope.

  • Thank you for your reply. Do you think it possible by mking use of Google GMAIL API? – user3043636 Mar 29 '18 at 17:12
  • Maybe, but then that's a programming problem, and similarly off-topic here. – ale Mar 29 '18 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.