Created
June 29, 2012 01:21
-
-
Save juanpabloaj/3015108 to your computer and use it in GitHub Desktop.
archiveGmail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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