Raboo / gmail-cleaner

Google Apps Script that moves e-mails to trash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This Google Apps script will move Gmail e-mails matching defined search queries to trash.

More info on Gmail Queries Given below.

Other useful links

Getting Started

Create a Google Apps Script project at https://script.google.com/ using the content of delete-old-gmail.gs.
Update delete_queries array to match your needs.
Save, then run function requestPermission to get the appropriate permissions.
After that run function addTriggers to add triggers that will execute the cleaner first after 6 minutes, then once per day.
It will move 500 e-mail conversations/threads to trash per execution. If there are more e-mails to be moved, it will add another trigger after 6 minutes and continue to do so until it is done.

Contributing

Pull request are welcome.

About

Google Apps Script that moves e-mails to trash

License:Apache License 2.0


Languages

Language:JavaScript 100.0%