
<p>Maintaining inbox zero and dealing with old emails takes work (for some, too much work!). This Google Apps script lightens the load a bit by automatically archiving or deleting old emails that are cluttering your inbox, based on a schedule you set.</p><p>Whipped up by John Day, these time-based Gmail filters will move old read emails to the trash or auto-archive them.</p><p>So, for example, you could automatically get rid of expired daily deals emails or other promotional emails that are more than two days old. First, create a Gmail filter that automatically applies the label "delete me" to that semi-spam when it comes in.</p><p>Then the Google Apps script, which you'll need to authorize for your Gmail account, takes care of deleting emails with that label that are older than two days. You can adjust the number of days before messages are moved to the trash in the script (see the delayDays variable and change the 2 to another number) and under the Resources > Current project's triggers... option, set the script to check your inbox every half hour or other interval.</p><p><a href="http://lifehacker.com/5986204/automatically-clean-up-gmail-on-a-schedule-with-this-script">Keep reading...</a></p>