Sandglaz Blog

sandglaz blog

Productivity

How to Snooze Messages in Gmail

Do you receive email messages that you don’t want to act on right away? Do you keep those messages unread? And, do you hate how it clutters your inbox with too many unread messages? If so, here’s a quick way to take messages out of your inbox until you actually need them. No extensions or add-ons required. Completely free. Just needs a couple of minutes to set-up.

How will it work

Once you have it set up, you will be able to quickly move messages to a Snooze folder, specifying the number of days you want to snooze it. After those days have elapsed the message will come back to your inbox marked unread. For example moving a message to “Snooze 2 day” will take the message away from your inbox and bring it back in 2 days.

How to set it up

Go to Google Docs, and create a new spreadsheet. From the Tools menu, select Script Editor. Copy and paste the code below. And Save it. You don’t need to understand it.

function getLabelName(i) {
  return "Snooze/Snooze " + i + " days";
}

function setup() {
  // Create the labels we’ll need for snoozing
  GmailApp.createLabel("Snooze");
  for (var i = 1; i <= 7; ++i) {
    GmailApp.createLabel(getLabelName(i));
  }
}

function moveSnoozes() {
  var oldLabel, newLabel, page;
  for (var i = 1; i  0) {
        if (newLabel) {
          // Move the threads into "today’s" label
          newLabel.addToThreads(page);
        } else {
          // Unless it’s time to unsnooze it
          GmailApp.moveThreadsToInbox(page);
          GmailApp.markThreadsUnread(page);      
        }     
        // Move the threads out of "yesterday’s" label
        oldLabel.removeFromThreads(page);
      }  
    }
  }
}

From the drop down click “setup” and then hit run. This will set up the Snooze labels for you. Then go to Resources > Current script’s triggers. And add a new trigger. Choose moveSnoozes, Time-driven, Day-Timer. Click Save. This tells google to execute the code every day in order to move back any messages you snoozed.

Here’s a video that walks you through this:

Note. This post is a step-by-step simplified version of Corey Goldfeder’s.