Pinterest Stumbleupon Whatsapp
Ads by Google

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.

Ads by Google

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.

gmail-snooze-8

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

  1. greg
    March 14, 2016 at 10:51 pm

    Still works perfectly. Brilliant when combined with keyboard shortcuts. Just type "v 7" and enter. Message is snoozed 7 days.

  2. John Leblanc
    May 10, 2012 at 12:18 am

    An excellent idea; can't wait to see if it works tonight. If so, Boomerang won't like you ;-)

    • Yaara Lancet
      May 10, 2012 at 7:50 am

      Haha, that's true. :) Although Boomerang does offer some more options, and the whole thing is a bit more refined. On the other hand, it's far from being free.

      Did the script work out for you?

      • John LeBlanc
        May 16, 2012 at 2:56 pm

        Sorry for taking a while to get back to you; I wanted to see how it works over a few days. Yes it's great! I have a couple of suggestions:
        1. As the default, can you change the status of a message that is "snoozed" to "unread"? If I'm looking at something and want to deal with it later I think it makes more sense to consider it "unread". It's also more visible once it reappears in the inbox since I tend to deal first with unread messages and then file away all of the read ones.
        2. I have a lot of labels and I have to use the scroll bar to get down to snooze. I would prefer to rename it to "_Snooze" so that it and its subfolders appear at the top of my many labels and I no longer have to scroll. Is this simply a matter of editing the script and adding the_wherever the word snooze appears or is there something more complicated to do?

        Thanks for considering these suggestions!

        • Yaara Lancet
          May 17, 2012 at 5:39 am

          Hi John!

          Your suggestions make sense, and I thought about the first one myself, but unfortunately, I'm not the one who wrote this script, and I'm not a coder myself, so I can't implement them.

          The script is open for changes if you know how to make them, so anyone who wished to change something and knows how to code can do so, but you need to know how to code. :)

          Changing the label name should be easy, actually, you can try changing to line that says:

          GmailApp.createLabel("Snooze");

          And change it to whatever name you want the label to have. As for marking things unread, I'm not sure how to do that. But maybe you have a friend who knows JavaScript and can help out.

  3. Jos
    May 9, 2012 at 5:56 am

    Wil this work when you use a gmail client? I use Postbox and Gmail labels translate into folders there. If I move an email into one of the folders created by the script, will the script still work for me and the mails be moved from folder to folder and in the end end up in my Postbox Inbox?

    • Yaara Lancet
      May 9, 2012 at 11:46 am

      Hmmm, I never used Postbox, so I'm really not sure. You can always try and see if it works. It's very easy to set up so you won't be investing too much time in trying.

      Sorry I couldn't be more helpful!

      • Jos
        May 15, 2012 at 2:33 pm

        Hi Yaara,

        It appears that if you make sure your are subscribed in IMAP settings to the labels in Gmail (these are folders in Postbox) that this works fine. I am very pleased with the script. It works like a charm in Postbox!

        Jos

        • Yaara Lancet
          May 15, 2012 at 3:14 pm

          That's great! Thanks for the update, glad it worked for you.

  4. mitch
    May 9, 2012 at 1:24 am

    Is there an error in the script? I get this when pasting into editor

    Missing } after function body. (line 7)Dismiss

    • Yaara Lancet
      May 9, 2012 at 6:44 am

      The script ended up appearing in a single line in this post. Not sure why. I fixed it now, so it's much easier to copy without errors. It should work now.

      Just in case, you can find the script here. Let me know if it worked!

      • Mitch
        May 9, 2012 at 1:40 pm

        Works great! Thanks.

  5. ryan_bigl
    May 8, 2012 at 11:54 pm

    I can't get this to work for me. When simply copy/pasting, I received this error:

    Missing } after function body. (line 1)

    When I tried to clean the code up a little bit (as in, fixed it so Google stopped giving me errors), I came out with this:

    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);
    }
    }

    Gmail authorized it and all, but I don't have a Snooze label. Any suggestions?

    • Yaara Lancet
      May 9, 2012 at 11:45 am

      I updated the post to have the script appear differently. Our editor keeps screwing it up for some reason. Try copying it now, and see if it works.

      If not, you can look here and try getting the script from there.

      If everything's working as it should but you can't see the labels, try logging out and logging into your Gmail again, that should make them appear.

      Let me know if it worked!

      • ryan_bigl
        May 10, 2012 at 1:15 am

        Thank you! I believe I had to copy the code exactly from the link you gave me lol.

        I love this site!

        • Yaara Lancet
          May 10, 2012 at 5:23 am

          That's awesome! Glad it worked out.

          By the way, I meant our text editor, not our actual person editor, just realized how that came out. :))

Leave a Reply

Your email address will not be published. Required fields are marked *