Gmail auto archiving

Розділи: 

Go to Google Drive and create a Google Apps Script named "gmail_auto_archiving":

function autoArchiveGmail() {
var threads = GmailApp.search('label:inbox is:read -is:starred -is:important');
for (var i = 0; i < threads.length; i++) {
threads[i].moveToArchive();
}
}

Then create a trigger to start this script daily.
Now all mail except unread, important and starred will be archived.