Automatically deletes old emails that match the specified label.
- Create a new Google Apps Script at https://script.google.com
- Update the following constants:
LABEL_TO_DELETE: the label that should be have old messages deleted
DELETE_AFTER_DAYS: the age of messsages after which they will be moved to trash
- Save the script, then run:
If you ever want to remove the script, run
Uninstall to remove any left over triggers.
- Added support for multiple labels
- Added configurable
- Increased default page size
- Decreased default delay between receipt and delete
- Removed use of deprecated
- Improved efficiency for long threads by checking
H/T: Arun's post How to Auto Delete Old Emails In Any Gmail Label