Hacker News new | ask | show | jobs
by alimbada 772 days ago
I use a Google Apps Script to clean up my Gmail inbox. It runs daily, searches for various senders and/or subject lines which are older than a certain amount of time and moves them to the Trash/Bin. It runs without intervention and I've got it set up to report any failures back to my inbox. Since my workplace also uses Google I've even set up a Script for my work inbox on my work account. Various notification emails, e.g. from Slack get cleaned up if older than 3 days old.
2 comments

I do something a little different, I tag all credit card payment notifications in a particular label, and wrote a google apps script where when a new entry is added, it adds it to my 'tasks'. That way I don't miss any credit card payments
Can you share the code for this?
Done: https://gist.github.com/alimbada/5bc5878338ead31b6308ac9fd74...

The queries are the same as what you'd type into the Gmail search bar to filter emails so you can test them out in Gmail and then add them to the list. I've added a comment to the gist with an image showing the trigger to run it daily. You can run it manually from the Google Script editor too for testing.

Edit: Forgot to mention I removed a bunch of queries and only left a few in as examples.