I have a couple on-going conversation threads in Gmail with a number of different people. Is there a way to setup a filter so that it will add a label if the body of any new, unread email contains my name? Then remove the label once I've read the email?
Create Gmail Filter if Message Body Contains Your Name
gmailgmail-filters
Related Topic
- Gmail filter not from address conversation
- Gmail Filter – Label Emails from Specific Addresses
- Gmail – How to create gmail filter to forward emails which would have stayed in inbox
- Gmail – Applying Filters to ONLY New Message Body
- Gmail – I accidentally labeled every single message in Gmail
- Gmail – In Gmail auto remove label when email is opened
Best Answer
Remember that you can use any Gmail search operator in a filter via the
Has the words:
textbox since Gmail just AND's together the operators that are filled in via the filter dialog.I'll suggest you start by trying this:
Create a filter that finds new emails with your name in them and applies a temporary label. The search operation you would use in the filter is:
Create a filter that finds read emails in the temporary label and removes the label.
Unfortunately, while filters can operate on read emails, they cannot currently remove labels, we are at a stopping point.
-
Sorry can't help more, but until Gmail filters can remove a label, you will not be able to accomplish this via filters.
Potential workarounds would be:
Setup an IMAP client with the equivalent filtering where instead of adding/removing a temporary label you would be copying/deleting the email from the temporary folder.
Google recently introduced a new scripting framework for Google Apps.
One really crude hack for step 2 would be to have the filter forward the email as well as delete it. You would forward to your own email address with a plus extension, e.g.
username+templabelname@gmail.com
.Then a new step 3 would be to catch those emails using the
deliveredto:username+templabel@gmail.com
search string, and reapply some label.Not sure how cleanly this method would work, especially because you would get header cruft from the forward (vs. redirecting).
Personally, I would look at #2 since learning scripting for Google Apps would pay off in the long run.