Automatically Mark All Archived Emails As Read Using a Gmail Script
Some messages are so short that you don’t even need to open them – you can simply archive them from your inbox or from the Android notification bar. Of course you have a bunch of unread emails in your archive. This simple Gmail script will fix that.
This Google script will run in the background on Google servers and mark any archived email as read without having to lift a finger. To create a script, follow these instructions:
- Go to script.google.com and create a new blank project.
- Remove the code that is in there and replace it with the code from this blog post .
- Save the project with File> Save.
- Mark an archived email as unread in your Gmail account. Then click the Run button in the Google Script window to test it. If your email is marked as read, it works!
- Go to Resource> Triggers of the current project and set how often you want the script to run. (I have mine set to run every 12 hours, but you can set it up more often if you like.)
- Save the script again and exit. From now on, it will continue to run in the background.
It’s a little annoying, but now the Android “Archive” button in the notification bar is more like “Archive and mark as read” and you will never have unread messages floating in your archive.
Marking Gmail Read Using Application Script | Mike Crittenden