Mark archived gmail emails as read automatically

I found I have this problem when archiving emails from notifications in android. I came across this blog which solved my issue straight away.

All credit goes to http://mikecr.it/ramblings/marking-gmail-read-with-apps-script

Here’s how it’s done.

1. Head to script.google.com to start a script.
2. Choose to create a script for Gmail in the little popup.
3. Delete all the sample code it gives you.
4. Replace it with this (written using the API reference):

5. Save the project with File > Save.
6. Add a new version using File > Manage Versions and enter “initial version” then submit that.
7. Do a test run using Run > markArchivedAsRead and be sure and authorize the app when it asks you to.
8. Add a new trigger using Resource > Current Project’s Triggers and choose to run the above function every minute (or hour or day or whatever if you want to be nice to Google’s servers).
9. Save the script again and exit. Don’t worry, it will keep running.

Leave a Reply