Created
January 8, 2019 13:18
-
-
Save shell/897eeeeaf24a37f8535c1251474d835d to your computer and use it in GitHub Desktop.
Google apps script to remove notifications older than 2 days
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 myFunction() { | |
GmailApp.search("in:inbox subject:\"[Slack] Notifications\" older_than:2d") | |
.forEach(function (msg) { return msg.moveToTrash(); }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment