Skip to content

Instantly share code, notes, and snippets.

@juanpabloaj
Created June 29, 2012 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanpabloaj/3015108 to your computer and use it in GitHub Desktop.
Save juanpabloaj/3015108 to your computer and use it in GitHub Desktop.
archiveGmail
function archiveNotification() {
var threads = GmailApp.getInboxThreads();
for ( var i = 0 ; i < threads.length; i++){
var subject = threads[i].getFirstMessageSubject();
if ( subject == "Notification Subject" ){
//Logger.log(subject);
GmailApp.moveThreadToArchive(threads[i])
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment