HOW TO Snooze Your Gmail Messages

We might often receive mails which we wish we could have received later. When you are in such a situation, you would perhaps move the mail to a separate folder  (and forget it later :P) This would be very inconvenient when you have to remember that you need to check an email at a later point of time. Just like snoozing your alarm, you can even snooze your Gmail messages. By snoozing your emails you can view emails in your inbox later (1-7 days). Just move them to the snooze label with the appropriate number of days and the emails would appear again in your inbox after the specified number of days in the label.

To Snoozer your Gmail messages, we will make use of Google Apps Script. To do this, follow the steps mentioned below:

Creating Script

1.Head over to Google Docs and click on Create new->Spreadsheet Now select Tools->Script Editor which contains “function myFunction () { }” which can be deleted.

2.After making the window empty without any code, place the code given below:

var MARK_UNREAD = false;
var ADD_UNSNOOZED_LABEL = false;
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));
}
if (ADD_UNSNOOZED_LABEL) {
GmailApp.createLabel("Unsnoozed");
}
}
function moveSnoozes() {
var oldLabel, newLabel, page;
for (var i = 1; i <= 7; ++i) {     newLabel = oldLabel;     oldLabel = GmailApp.getUserLabelByName(getLabelName(i));     page = null;     while(!page || page.length == 100) {       page = oldLabel.getThreads(0, 100);       if (page.length > 0) {
if (newLabel) {
// Move the threads into "today's" label
newLabel.addToThreads(page);
} else {
// Unless it's time to unsnooze it
GmailApp.moveThreadsToInbox(page);
if (MARK_UNREAD) {
GmailApp.markThreadsUnread(page);
}
if (ADD_UNSNOOZED_LABEL) {
GmailApp.getUserLabelByName("Unsnoozed")
.addToThreads(page);
}
}
// Move the threads out of "yesterday's" label
oldLabel.removeFromThreads(page);
}
}
}
}

Google Apps Script

3.Now Click on File->Save and give a name to your file.

Creating LabelsSetup

1. From Select A function drop-down select setup

2. Click on the run icon on the left to run the function.

3.While the function runs you will be asked to grant permission to Gmail to run this script.

4. After authorization, you might get a message which says “you can run the script now”. You will need to run it again, else you don’t need to do that again.

5. Now move to Gmail and refresh it again. If you see the nested labels in your Gmail like the one below, you have done it right.Snoooze Gmail messages

Make the Script Run Daily

You have mad the labels for snoozing Gmail messages but now you need to make this script run daily. To do this,

1.Select Triggers->Current Project Triggers. Now click on “No Triggers Set up”

2.From the run drop-down, choose movesnoozes, from the Events drop-down select Time-driven. The next two drop-downs must be set to Day timer and Midnight to 1 am.

3. Save the changes.

Use Snooze Labels In Gmail

Everything has been set up right now. To snooze an email, just open it and select Move to->Snooze/Snooze x days where x is 1-7 days. After you do this, the email will appear in your inbox again after x days depending upon the label to which you have moved it!

This trick lets you make the best use of Gmail. You can also check how many mails need to be checked in future by clicking on any of the labels.

[via Lifehacker]

Leave a Comment