A Google Apps Script script to automatically delete unarchived mail after 7 days that hasn't been starred or marked as important
- Backup your emails using Google Takeout.
- Load this script into a new Google Apps Script project.
- Execute the setPurgeTrigger() function to set a trigger that will call the purge() function every day.
A detailed blog post with more information can be found at https://benbjurstrom.com/purge-email
Thanks to this gist by jamesramsay for getting me started in the right direction.
I searched for something like this because the search parameter "older_than" was not working. After I completed the script setup, the script was not working, I removed the parameter "older_than" and the script started running the Purge More automatically, the way it should.
This is unfortunate, and I dont know how to get around this problem.
edit: actually, the script might not be running automatically. :sigh:
update:
It is running .... but with the fact that I cant search "older_than" or something... im stuck.