Mark Gmail as read when archiving from notification The most recent version of the Gmail app as the great feature where
you can choose between archiving or replying to e-mails directly from
the notification.

My problem is that, if you archive it from the notification, it
remains unread (instead of being marked as read). Is there anyway to
get around that?

I'd like for any e-mails that are archived directly from the
notification to be automatically marked as read.
Did you say Google Script?

Marking Gmail read with Apps Script

The idea behind this script is to mark as read any message that is not in the Inbox (i.e., has been archived).


  
  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');
   GmailApp.markThreadsRead(threads);
 };
  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.
  Save the script again and exit.
  


I don't know that it's necessary to run it every minute, but as long as you run it regularly.

This isn't a direct answer to your issue, and if you have reasons to have unread messages that aren't in your inbox this won't work for you.