I just switched from my email hosting providers web mail interface to Gmail. One feature I miss is being able to tell the app to mark messages as read when I archive them.

Example: (In Gmail)

I don't read every message I receive. For most of them, I just look at the subject line or the sender. Then, I bulk-select all messages I don't want to read and archive them all. However, they are still marked as unread in the Gmail "All Mail" view.

Is there a way to tell Gmail that, when I archive a message (or multiple), I want them to a) be moved to the archive folder and b) I want Gmail to mark them all as read?

  • Just a note: "Archive" in Gmail means "remove the 'Inbox' label". There's no "archive" folder.
    – ale
    May 28, 2016 at 16:36

4 Answers 4


You can do this with keyboard shortcuts.

With the messages you want to mark as read and archive selected, simply hit Shift+I then E.

The first marks the messages as read, the second archives them.

Keyboard shortcuts for Gmail

  • 2
    This is a good answer, but I'd like to be able to do it in one key stroke.
    – dinosaur
    Sep 30, 2017 at 15:43

I much prefer this method, which automatically marks any emails that have been archived as "read," per Mike Crittenden:

Head to script.google.com to start a script.

Choose to create a script for Gmail in the little popup.

Delete all the sample code it gives you.

Replace it with this (written using the API reference):

function markArchivedAsRead() {
  var threads = GmailApp.search('label:unread -label:inbox');

Save the project with File > Save.

Add a new version using File > Manage Versions and enter "initial version" then submit that.

Do a test run using Run > markArchivedAsRead and be sure and authorize the app when it asks you to.

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).

Save the script again and exit. Don't worry, it will keep running.

And you're done. It will continue to run every minute until you stop it. How awesome is that?

Update: Some people are reporting an error which says

This operation can only be applied to at most 100 threads. (line 3, file "Code")

To fix this, you have to manually do a search for "is:unread" and mark all of them as read before running the script, so that it starts with a clean slate. The script can only process 100 threads per run, so if you give it more than 100 on the first run, that'll obviously bust it.

Source, Mike Crittenden's Website

  • 2
    This answer is great, but the only thing I would add is to follow these instructions on how to add a trigger: developers.google.com/apps-script/guides/triggers/installable
    – Olshansky
    Oct 5, 2019 at 13:24
  • 1
    If you have multiple Google accounts, make sure you're logged in to the correct account before creating the project. When you're authorizing the script, there's an option to change accounts, but logging into another account won't work. It will allow you to login, and everything seems to go okay, but the script won't actually run. A bit annoying, since there isn't an error of any kind.
    – Kankaristo
    May 5, 2020 at 8:30

Small imrovement, with respect to Zediiiii and his answer, that was really helpfull for me.

We may avoid error "This operation can only be applied to at most 100 threads" by implmenting tiny changes in the code:

function markArchivedAsRead() {
  var threads = GmailApp.search('label:unread -label:inbox',0,100);

This means, that every run of the function marks up to 100 archived threads as read. As trigger is used to run this function periodically (1 per min or hour ...), sooner or later all threads will be marked as read without errors.


THE SIMPLE WAY (Before archiving your emails)

You would first need to select the emails you need treated, click on the little arrow of the More button and Mark as read. You can now archive them as usual.
mark as read

Please note that if no emails are selected you see different options under the More button.

THE GMAIL WAY (Using filters/labels)

Using Gmail capabilities you could automate the procedure by creating filters so as to handle your incoming emails on arrival.

Click on the Search Field on the very top of your Gmail, fill out your parameters and create a filter.
search 01

On the second screen choose your desired options.
You could even create and apply a label (e.g. Junk) so you can always easily find which emails were auto archived. search 02

EDIT (additional info)

In case someone is unaware of where to find the Archive button, here is a screenshot. archive button

As commented by w3dk there is a Labs feature you can enable under Gmail settings and have an easier/alternative way of setting emails as read. mark as read

  • 1
    "click on the little arrow of the More button and Mark as read" - There is also a convenient Mark as read button that can be enabled in Settings > Labs - cuts out one click!
    – MrWhite
    May 28, 2016 at 9:34
  • 1
    Correct! Thank you @w3dk . Will update the answer to make it more complete. May 28, 2016 at 9:40
  • Though this doesn't address automatically marking as read emails that I swipe to archive on my phone. Is there any way to do that? Dec 15, 2016 at 1:03
  • @TrevorNorris Not that I am aware of. Sorry. Dec 16, 2016 at 10:40
  • 1
    There is! See my answer below.
    – Zediiiii
    Jan 13, 2019 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.