Skip to content

knoid/gmail-read-tomorrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Read Tomorrow's GMail Script

Purpose

This solution will help you collect those not so important emails you do have to read (or skim over) and deliver them to your inbox with a specific frequency so you don't have to be checking them all the time.

Do you have too many emails arriving all day to your inbox? With this script you can delay all these annoying emails and handle them only once a day. (Only compatible with GMail).

Prerequisites

  • Have GMail or similar Google Apps Email.
  • Create a label called "Read Tomorrow" in your email (or the name you like most for this feature, please remember it).
  • Add an email filter that will automatically remove annoying emails from your inbox and will put them in your newly created label. Optionally you can mark them as read because they will be marked as unread automatically.

Instructions

Go to Google Scripts, start a new Blank Project and copy the following code:

// Label the conversations will be moved from
var labelName = "Read Tomorrow";

function moveConversations() {
  var label = GmailApp.getUserLabelByName(labelName);
  if (label != null) {
    var threads = label.getThreads();
    for (var i = 0, n = threads.length; i < n; i++) {
      threads[i].removeLabel(label);
      threads[i].markUnread();
      threads[i].moveToInbox();
    }
    Logger.log("Moved " + threads.length + " conversations.");
  }
}

The last step is to schedule it. You do this by clicking in Schedule and adding a trigger for "Time-driven", "Day timer" and some time in the morning, I chose 4am to 5am.

Extra customizations

Hiding label: It is a bit useless (and it bothers me) to see the label there, you shouldn't even need to click it anyway so you can hide it by clicking in the label's right arrow and marking "Hide".

About

Only read annoying emails once a day!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published