Created
September 3, 2019 04:25
-
-
Save tomoasleep/3a97e8f00a8b4b0b76cd72de8ce41657 to your computer and use it in GitHub Desktop.
willarchive ラベルが付いた3日前以上のメールを既読にして archive するやつ
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 archiveOldEmailsWithWillArchiveLabel() { | |
var willArchiveThreads = GmailApp.search("label:willarchive older_than:3d in:inbox"); | |
for (var i = 0; i < willArchiveThreads.length; i++) { | |
willArchiveThreads[i].markRead(); | |
willArchiveThreads[i].moveToArchive(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment