Automatically Delete Daily Deal Emails Using Gmail Filters

Back in August, a reader asked if it was possible to have Gmail automatically delete daily deal meals 24 hours after they arrived. That wasn't an option at the time, but a new search option for Gmail means it's now possible. Here's how.

Commenter steven2358 points out that Gmail now has a search option, older_than:, which lets you find messages within a given relative time period. That makes it possible to create a filter which finds all messages from a given sender than are more than 24 or 48 hours old and delete them. Result!

To do this, create a search that finds all your unwanted deal messages. In the example screenshot, I've gone for from:Groupon. Then add the older_than:2d option. (That deletes messages after 48 hours; you could also use olderthan:1d for even faster deletion after 24 hours.) Click on the down arrow and choose 'Create filter from this search'. In the filter options, choose 'Delete it' and create the filter. (You can also choose to apply the filter to existing messages.) From now on, daily deal messages will automatically be deleted after 24 hours. Thanks steven2358!


Comments

    Is there a way to automate this or the deletion of a particular tag?

    Sadly, I'm not 100% convinced that this method will work... AFAIK filters are applied (executed) when the email arrives, not after a predefined time/schedule.

    As an example, try to create a filter that will automatically delete emails from your SPAM folder that is more than an hour old....
    is:SPAM older_than:1h - Gmail pops up an error message saying that message searches using 'is/in' etc "are not recommended as they will never match incoming mail."

    Will give it a bash though...

      Exactly my understanding as well -- if I am reading things correctly, filters only run when when the mail comes in. I quickly tried your test and can confirm it doesn't work.

      What gmail really needs is the ability to schedule a filter to run on a regular basis. That would solve this problem. I've requested the feature here (via google labs)
      https://groups.google.com/forum/?fromgroups=#!topic/gmail-labs-suggest-a-labs-feature/iummrQ1XwRw
      and here: http://support.google.com/mail/bin/static.py?hl=en&page=suggestions.cs&bucket=16937&issue=116876

      uh Angus, did you actually try this? great to hear if and how it works.
      I guess you could just run the search periodically but it would be nice to have it set up automagically.

    I'm sorry but this does not work. It runs only once (on creation). Gmail is lacking the ability to automatically run filters on schedule against existing emails.

    Let me explain... when new mail arrives it gets checked by the filter. It asks: Is this email older than one day? No... then it hits the inbox, so you end with the same problem since it only runs the filter against new email, not existing one (only does this on the creation of the filter and even then you got to manually check the box).

    Hope they implement this.

Join the discussion!

Trending Stories Right Now