Automatically Delete Daily Deal Emails Using Gmail Filters

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!


  • 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…

  • 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.

Show more comments

Log in to comment on this story!