Ask LH: Can I Automatically Delete Deal Emails After A Fixed Period Of Time?

Dear Lifehacker, Like many people I suffer from a swamped inbox. I receive many newsletters and daily deal offers which are often only on interest on the day they're sent. What I'd love to do is to take those kinds of emails and automatically delete them if they're unread after 24 or 48 hours. I don't want to unsubscribe, but I'd love them to disappear after that time. Any ideas? I use Gmail, and there's usually a solution! Thanks, Mail Manager

Dear MM,

It's very easy to get Gmail to automatically label emails from a given sender and shift them from your inbox. For the benefit of anyone who doesn't know how to do this, here's a quick reminder:

  1. In Gmail, perform a search that will find the relevant message (using a term such as 'Groupon').
  2. From the 'More' dropdown, select 'Filter messages like these'.
  3. Select 'Create a filter from this search' on the screen that appears.
  4. On the next screen, choose the label you want to apply to these messages (you can create a new one if needed). Make sure to tick 'Skip the Inbox (Archive it)' to keep the message out of your main inbox.
  5. Click 'Create filter' and you're done.

However, I haven't been able to find a way of getting Gmail to take the next step: automatically deleting emails with a given label after a fixed period of time. It's not an option in Google's standard management tools, there don't seem to be any extensions that perform that role, and I couldn't get our old favourite ifttt to do it either. It's a popular request as a feature on Gmail support forums, but no-one seems to have cracked it yet. (If you know different, please tell us in the comments.)

Outside of Gmail, it's definitely doable. If you use the desktop Outlook client, you can have emails in any given folder delete themselves after a set period of time. Set up an Outlook rule to move all messages with a given subject or sender to that folder, then right-click on the folder, choose Properties, go to the Auto Archive tab, choose the 'Archive this folder using these settings' option, set the time period you want, and choose the 'Permanently delete old items' option.

The same option is built into the newly-launched Outlook.com. Right-click on a message, choose 'For this sender' and then 'Schedule clean up'. The most useful option is probably 'Only keep the latest mail from this sender', but you can also choose to delete all messages older than 3 days or to archive to a different folder. It's the cleanest solution to the problem I've seen so far.

Cheers Lifehacker

Got your own question you want to put to Lifehacker? Send it using our contact tab on the right.


Comments

    Google wants to mine your email contents as long as they can. It's unlikely they'll provide a built-in tool for this...

      And for what purpose? I hear lots of "Oh no Google knows everything about me now!" cries, but people continue to use Gmail. And what would they do with everyone's contact details? Sell them for money? Google is making billions off of advertising, so it's not financial. World domination? Already done with search.

      I choose to use Gmail because it suits my needs. I can turn email "scanning" off so I just see generic ads, or I can choose to trust in Google to keep my data secure, like I trust in my bank to keep my money safe, my doctor to keep me healthy and my local store to keep food on the table.

    The benefit of automatically having them shift to a separate folder is at least whenever you are logged in it is a quick clear out the folder job.

    You should be able to create a Google Apps script (I think that's what it's called?), just like that Gmail to Google Drive script that runs. If date since received > 30 days (or however long your deal lasts) then delete. You could even get it to scan the body of the message for the duration so it'll delete it the day after the offer expires (if it only lasts a week while others last two)

    I set up a filter to add a label called 'Disposable' to most of my deal emails, newsletters, notifications, etc. Whenever I remember I just go to the Disposable folder, select all and delete. If I want to keep one, its easy enough to remove the label when reading the email.

    Dont know about the gmail web interface, but you can do it easily using outlook or another client, just make a rule that sends email over a certain amount of days old to another folder or trash. I did this with thunderbird at my last job when the mailing list got me swamped with messages, so I chose to only keep the last week's worth of messages from that list and delete the rest.

    also, according to http://www.internettipoftheweek.com/427/how-to-automatically-archive-old-messages-from-your-gmail-inbox/ you can do it with Gmail's filtering system. I was a little confused as sometimes when they say "on incoming emails" they actually mean it and sometimes they dont

      Tom, that's the method I describe in this post -- it archives emails out of your inbox but doesn't completely delete the expired ones, which is the aim here.

    Google heard your pain. You can now solve this using the new search operator "older_than".

    Source: http://support.google.com/mail/bin/answer.py?hl=en&answer=7190

      This worked for me

    You can create time-based Gmail filters with Google Apps Script: http://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script

    Here's a ready made Google Script to auto delete older emails in any label which you can copy to your Google drive and use.
    https://script.google.com/d/1knTE7bCAXoIVygfrkTZIUQZLQbojOGQQeWNOgzb_Gj9aQXqLZALw0YMb/edit

    For more details and how to run a Google Script, see this -
    http://goo.gl/Cm2Vf

    Last edited 19/01/13 5:53 pm

Join the discussion!

Trending Stories Right Now