Tuesday, May 08, 2012

How To Add A Snooze Function To Gmail Without Using Third-Party Apps

How To Add A Snooze Function To Gmail Without Using Third-Party Apps:
add a snooze button to gmailAn overflowing inbox is a problem, and one almost everyone has to face daily. We’re all trying to avoid leaving a huge stack of unread e-mails in our inbox, but let’s face it, we can’t deal with everything the minute it comes in. The confusion a full inbox creates is sometimes so big, it becomes a reason to delay answering all by itself.
There are many solutions and add-ons to create e-mail reminders and have e-mails return at specific times, but if you’re a DIY kind of person, or simply like to try new things, there’s a way to add a snooze function to Gmail without installing or using any third-party app. This method employs App Scripts, but you don’t have to know how to code in order to use it. Installing this function is quick and easy, and best of all, completely free.
Simply follow this step-by-step guide and you’ll be snoozing e-mails in no time.

What Is Gmail Snooze?

Gmail Snooze is a script that creates a new snooze label in your Gmail account, along with 7 new sub-labels. When you want to snooze an e-mail for 3 days, simply move it to the matching label, and the script will do the rest of the work. After the right number of days, the e-mail will re-appear in your inbox, where you can promptly snooze it again. Or alternatively, deal with it.
add a snooze button to gmail
The script is verified by Google, so you don’t have to worry about adding it to your Gmail account.

Setting Up Gmail Snooze

Setting up the script is easy and take only a few minutes. To start, go to Google Docs and create a new spreadsheet. In the Tools menu, choose “Script editor…”.
snooze gmail
In the script editor, erase whatever’s there by default, and paste in this code:
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 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); } } } }
After pasting in the code, click on the disc icon to save your script, and give it a name. Once you’ve done that, click on the “Select function” dropdown menu and choose “Setup”. Now click on the run button (the gray triangle). You will have to authorize the script before you can run it.
snooze gmail
Now switch over to Gmail and look at your labels. A new “Snooze” label has now appeared. If you expand this new label, you’ll find  7 new sub-labels. Of course, this doesn’t have to be expanded in order to work, so it won’t create too much unnecessary clutter.
snooze gmail
It’s now time to set the script’s trigger. Since the script works by days, it should run every night and advance a snoozed e-mail from label to label, until it pops back into the inbox.
To set up the trigger, go back to the script editor, click on the Resources menu and choose “Current script’s triggers”.
gmail snooze button
A prompt will inform you that there are currently no triggers, and will offer you to add a new one. In “Run” choose the moveSnoozes function. In Events, click on Time-driven, and then choose “Day timer” and “Midnight to 1am”.
gmail snooze button
You can, of course, choose something different as a trigger, but considering how the script is made, this is the most logical option. That’s it, your Gmail Snooze is set up and ready to work!

Using Gmail Snooze

It’s  now time to put Gmail Snooze into action. When you encounter an e-mail you wish to snooze, mark it, click on the “Move to:” menu (folder icon) and find the right label for the amount of time you wish to snooze the message for.
gmail snooze button
When you click on the label, the message will disappear from your inbox and will be placed in its respective folder. If you look at the labels on the left pane, you will be able to see the snoozed e-mails waiting there. The moveSnoozes function will run every night between midnight to 1am, and move all your snoozed e-mails one label forward. When the time is up, the snoozed e-mail will re-appear in your inbox.

Removing Gmail Snooze

If you’ve decided you don’t want to use Gmail Snooze anymore, it’s easy to remove. Access the script editor again, and on the left bar, choose the Gmail Snooze script, then click on File –> Delete.
This will revoke access for the script from your Google account (you can check the list here to see that it’s been removed). What it won’t do, is delete the labels it has created. To do that, simply click on the Snooze label on the left pane and choose “Remove label”. This will remove all the sub-labels as well. Just be sure you’re not accidently deleting snoozed e-mails along with the labels, these will be lost forever!
add a snooze button to gmail

Final Thoughts

Using the Gmail Snooze script might not be the most refined or exciting way to snooze e-mails, but it’s a great way to get into the world of App Scripts, which, when you figure them out, can help you automate and customize Gmail even further. It’s free, and doesn’t require any third-party apps, which is always a plus. It’s an awesome way to snooze e-mails, which is easy to remember and easy to execute. Unlike other methods, this is something I can really see myself using.
What about you? Will you give Gmail Snooze a try? Do you use something different to control your overflowing inbox? Share in the comments!
Clock image via Shuttertock

No comments:

Post a Comment

[Please do not advertise, or post irrelevant links. Thank you for your cooperation.]