Skip to content

Instantly share code, notes, and snippets.

View kizza42's full-sized avatar

Kieran Vella kizza42

View GitHub Profile
@kizza42
kizza42 / remove_mail_archive.txt
Created April 5, 2023 05:28 — forked from Galarius/remove_mail_archive.txt
gmail: remove archive
has:nouserlabels !in:Inbox -label:sent -label:drafts
@kizza42
kizza42 / archiveInbox.gs
Created April 5, 2023 05:28 — forked from agirton/archiveInbox.gs
Gmail App Auto Archive
/**
* Archive all read emails that have been read and
* it has been 7 days.
*
*/
function archiveInbox() {
// search for threads based on following parameters
var threads = GmailApp.search('label:inbox is:read older_than:7d');
for(var i=0; i<threads.length; i++) {