Saturday, July 30, 2011

Gmail Snooze with Apps Script

At Google, we all use email very heavily -- for communicating with other Googlers, for task management, and to mail around funny pictures of kittens. Because of the volume of email we all deal with, a lot of Googlers subscribe to the “inbox zero” philosophy where we try to keep our inboxes empty except for the messages we currently need to deal with.

What is Gmail Snooze?
One feature that some of us really wanted was for Gmail to let you “snooze” an email. Snoozing means archiving an email for now, but having it automatically reappear in the inbox at some specified time in the future. With Apps Script you can extend Gmail to add this functionality and a lot more yourself.

How to set it up
Even if you don't know how to write a script, it's pretty simple. Go to Google Docs and create a new spreadsheet, then choose "Script Editor" from the "Tools" menu. Paste in the following 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 <= 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;     // Get threads in "pages" of 100 at a time     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);       }       }   } } 
Then click the “Save” button and give it a name. In the dropdown labeled "Select a function to run," choose "setup" and click the blue run arrow to the left of it. This will ask you to authorize the script, and will create the necessary labels in your Gmail. Then go to the "Triggers" menu and choose "current script's triggers." Click the link to set up a new trigger, choosing the "moveSnoozes" function, a "time-driven" event, "day timer," and then "midnight to 1am." Click save and you’re done.

Using the Snooze Label in Gmail
To "snooze" a thread, use Gmail’s “Move To” button to move the thread into the "Snooze for X days" label and archive it. Every night, threads will move up through one day of the queue, and at the appointed number of days they will reappear in your inbox, unarchived.

Because this is an Apps Script, you can edit the code any way you like. If you’d like different snooze times or for unsnoozed messages to get starred, you can easily change the code. And if you have an even better idea for how to use Apps Script to improve Gmail, you can post it to our Gallery (Script Editor > Share > Publish Project) to share with the world.

Thursday, July 28, 2011

Save your friends from outdated email—help them switch to Gmail

I switched to Gmail the first month it came out, mere seconds after receiving an invitation from a friend and two years before joining Google. Since then, I’ve invited hundreds of people, most of whom have happily made the switch to Gmail and never looked back.

But I have one friend, Andy, who’s the straggler in the group. A couple months ago, I sent out an email about a barbecue I was having. On the “To:” line, there were 15 Gmail addresses and then Andy. He stuck out like a sore thumb. Shortly thereafter, Andy was complaining to us about how much spam he got. That was the last straw.

My friends and I sat Andy down and talked him through how to import his contacts. We answered his questions, guilt-tripped him a little, and a few painless minutes later we were done. Andy had Gmail.

We all have a story like this. On the Gmail team, we affectionately refer to them as “email interventions.” We hear about them all the time: the cousin who finally switched from an embarassing address like hottie6elliot1977 to a more professional elliot.d.smith@gmail.com, a co-worker who helped his dentist switch after he heard her grumble about having to pay for IMAP access, etc.

It’s for these folks we created emailintervention.com, a site that makes it easier than ever to help your friends and family make the switch.

taging an intervention is simple:
  1. Visit emailintervention.com
  2. Sign in and automatically identify who from your contacts has yet to make the switch, or just enter a friend’s email address manually
  3. Choose from one of three intervention message templates (“straightforward”, “concerned” or “ embarrassed”), and add your own intervention video if you’d like
  4. Send a customized email and follow up as needed


Your loved ones are counting on you. Even if they don't know it yet.

Wednesday, July 27, 2011

Review your mail forwarding and delegation settings

A number of Gmail settings are the kinds of things you can set and forget — like mail forwarding and delegation. When I was in college, I used filters to forward bills I received via email to my parents (lucky them!). That was useful for a few years, but not so much now that I’ve been paying my own bills for a while.

It can be pretty easy to forget about all the settings we’ve enabled years earlier. So, for about the next week, if you use Gmail's forwarding or delegation features you’ll see a message at the top of your inbox each time you sign in. The notice asks you to review your settings and confirm they’re still what you want.



If things look right, you’re good to go. The message will stop appearing in about a week. If you see any unfamiliar accounts or forwarding setups you no longer need, review your settings and change them as appropriate. Note that any unfamiliar accounts may indicate that your password has been compromised and you should change it immediately.

Tuesday, July 26, 2011

Your initial feedback on Gmail’s new look

few weeks ago, we released a preview of Gmail’s new look via two new themes. We asked you to try them out and send us your feedback. So far, less than 5% of Gmail usage is happening through these themes, but we’re getting some good feedback on what’s working and useful advice about what to improve from you early adopters.

What you like
  • The clean and minimalist look of the new design
  • Seeing a consistent “look” across Google products
“The new Preview theme is wonderful! It's clean and crisp, easy to read and really focused on the one thing that matters most in Gmail — the mail! Thanks!"
What you want to change
  • Too much whitespace and not enough information (though interestingly, many people reported that they appreciated to lower information density after a while)
  • Not enough contrast
  • Darker theme options
"Even with the 'dense' version, I still have listings of about 30% fewer messages. The lack of visual differentiation between content and UI chrome is also harder to process (e.g., where does the conversation list end and the toolbar begin)."
We’re working on improvements for the final release, but it is very encouraging that a visual update like this was generally greeted with such a positive response. If you haven’t tried out the new themes yet, give them a go and tell us what you think.

Friday, July 22, 2011

Faces of Gmail: Sarah Price

In this month’s Faces of Gmail we’re profiling Sarah Price, our history-loving, lindy-hopping community manager.

What do you do on the Gmail team?
I’m the Community Manager for Gmail. That means that I watch over Gmail’s user forum and talk with Gmail users in other places. For example, I’m one of the people behind @gmail on Twitter and Facebook. If you use Google+, you can follow me there, too!


What’s the most challenging part of your job?
Gmail users have high expectations for us. They think of Gmail as their own and have great ideas about how to make it better. I love this about our users. Sometimes, though, we make a change that some people love and some people don’t like as much. For the people who don’t like the change, it can be hard to help them understand why we made it, and that we are still listening to their feedback.

What’s your favorite part of your job?
I love that I get to work with such an amazing product, and I love meeting Gmail users from all over the world, including the “Top Contributors” in our Help Forum. I also love helping people get to know each other. It’s very powerful when people come together over a common interest in Gmail.

What did you do before coming to Google?
I studied Latin Literature at Yale and Ancient History at Oxford. You are probably wondering how I ended up at Google! While I was a student, I also worked as a computer repair technician. I enjoy solving problems and teaching people about technology.


What’s your favorite lab?
How can I pick just one? I couldn’t live without Multiple Inboxes, which I combine with Superstars. Inbox Preview is really cool, too.

Which theme do you use?
I recently switched to the Preview (Dense) theme. It took a day or two to get used to it, but I like how clean it feels.

What’s something you think every Gmail user should know about Gmail?
Everyone should take a tour through settings. Just click through the pages and see what you find. There’s a lot of great stuff in there, and some really important things, too, like options for recovering your account if you ever lose access.

What do you do when you’re not working on Gmail?
I rehearse and perform with my fusion social dance group, Decadance. We do everything from hip hop to waltz -- sometimes in the same piece! I joined Decadance because I love the lead/follow dynamic in partner dance. When I’m not dancing, I love to read, travel and play games, both board games and video games. I’m also starting to plan my wedding.

What’s your biggest pet peeve?
I hate waste when it’s easily avoidable. For example, when someone leaves the door ajar on the refrigerator in the office kitchen, or throws away a plastic bottle when there is a recycling bin nearby.

Thursday, July 21, 2011

Make multiple calls in Gmail

Over the years, we've expanded Gmail's communication abilities by allowing you to make voice and video calls to other computers and more recently call phones. Until now, though, you were limited to making one call at a time. Today we're excited to relax that restriction and allow you to make or receive multiple calls in Gmail.

If you’re in a call and make a second one, your first call will be put on hold while you talk on your new call. You can switch between calls by pressing the “Resume” button on the call you want to talk on, which will automatically put the previous call on hold.


Receiving incoming calls while you're in another call is just as easy: you'll receive a notification of the incoming call and can choose to accept it or not. If you take the new call, the previous call will be put on hold.

Whether you make a second call or not, you can now put any call on hold — useful in case you need to talk to someone in the room or grab something off the stove. Just press the “Hold” button and then “Resume” to start talking again.

This feature works across all call types (voice, video, and phone); the only restriction is that a maximum of two outgoing calls to physical phones can be placed at once.

Wednesday, July 20, 2011

A new and improved Gmail gadget for iGoogle

With iGoogle, you can personalize your homepage with the information on the web that’s most useful and relevant to you. You can check email, watch videos, catch up on the latest news, check the weather, and more. One of the most common iGoogle requests we’ve been hearing is to update the iGoogle Gmail gadget. Because the Gmail gadget has to share space with other gadgets on the screen, the Gmail experience can be limited to an area not much larger than the size of a business card. Since we’ve already built an experience optimized for small screens with Gmail for mobile, we decided to adapt the mobile web version for iGoogle and are now rolling out an updated gadget.


The new Gmail gadget is pretty similar to the mobile experience — it's fast, looks good in small spaces, and includes popular features like search and labeling. By default, it appears in a minimized window (shown above); if you expand it into canvas mode by clicking on the maximize button in the upper right hand corner, you get the two pane view until now provided only on tablet devices (shown below). Going forward, the Gmail gadget will be updated with new features in tandem with the mobile edition.

Click the image above to see a larger version.

We’ll be rolling out the new Gmail gadget over the next couple weeks. If you’re already using the gadget, it will update automatically. If you’re not, you can add it to your iGoogle page here. Keep in mind that the new gadget currently requires a WebKit compatible browser, such as Chrome or Safari.

Tuesday, July 19, 2011

ZIP and RAR support now available in the Google Docs Viewer

Downloading files that you only need to preview can create unnecessary clutter on your computer. While you can already use the Google Docs Viewer to view over 15 different file types in Gmail without downloading them, today we’ve added support for archive file types ZIP and RAR. Now, if someone sends you a ZIP or RAR file in Gmail, you’ll be able to view its contents from within your browser by clicking on View.


This will bring up a view that includes all of the files in the archive, the file types, and the size of those files.



When you hover over the list you can activate a menu by clicking the “Actions” button. You’ll be able to View items supported by Google Docs Viewer and Print (PDF) those that we offer PDF support. Save to Google Docs and Download appear for all files.



ZIP and RAR archives that are embedded inside other archives also work. For example, if you have a RAR file inside a ZIP file (like in our example above) you can just click on that file to access the embedded archive.

Go ahead and try the feature by viewing a ZIP file

This feature extends to Google Docs for mobile, too. For each viewable file (including embedded ZIP or RAR archives) there is a link to view.

We hope this removes the need to download full archives when you only need to work on select items. We’re always adding more file types to the Google Docs Viewer -- let us know what file types you’d like to see support for next in the forums.

Friday, July 8, 2011

New! Pick your favorite inbox style

Ever felt like there should be a better way to manage your inbox? There are already lots of different ways: some people read everything, some mark messages they need to take action on with stars, and others like to have their important email separated from the rest automatically — something Gmail started offering last year with Priority Inbox.

Over the coming weeks, we're rolling out several new inbox styles to help you manage your mail in the way that works best for you. Once it’s turned on for your account, you can easily choose a style from the tabs at the top of your inbox:


  • Classic - This is the default inbox style most people are used to. In the Classic inbox, messages are ordered chronologically, with your most recent email at the top.
  • Priority Inbox - Important and unread messages appear at the top of your inbox, then starred messages, then everything else. Each section can be customized further, so you can create your own inbox style.
  • Important first - This style puts important mail at the top of the page (both read and unread messages). Everything else is in its own section at the bottom of your inbox. You may have noticed that we turned on importance arrows for everyone a few weeks ago; this inbox style separates messages with these arrows from those without.
  • Unread first - Simple: unread mail at the top; everything else at the bottom.
  • Starred first - Starred messages at the top; everything else at the bottom.
After you've settled on a style you like and used it for about a week, these tabs will go away, You can always change your inbox style from the drop down menu next to the Inbox label or from the Settings page.



So try on a new inbox style and see what fits you best!

Friday, July 1, 2011

A preview of Gmail’s new look

We get a lot of great feedback about how Gmail helps you be more efficient, keep in touch with family and friends, and get work done. We’ve saved you from forgetting attachments and made sure that you got the right Bob. Over the years, adding countless features to Gmail has made it an increasingly powerful communication hub, but along the way the interface has also become more cluttered and complex.

That’s one of the reasons we’re embarking on a series of interface updates to help strip out unnecessary clutter and make Gmail as beautiful as it is powerful. This is part of a Google-wide effort to bring you an experience that’s more focused, elastic, and effortless across all of our products. The changes are not going to happen all at once. We know that you love and care about Gmail as much as we do, and we’ll be working on these upgrades gradually over the next few months to allow plenty of time to understand and incorporate your feedback into the evolving design.

We’re kicking things off with two new themes for you to try out as a sort of sneak peek at what we’re up to. Starting today, you’ll see the “Preview” and “Preview (Dense)” themes in the Themes tab in Gmail Settings. Why two themes? Our new interface will eventually expand dynamically to accommodate different screen sizes and user preferences, but until then you can pick the information density that you prefer.

Here’s what one of the new themes currently looks like:



And in conversation view:


Click the images above to see larger versions.

If you poke around you’ll hopefully find a lot to like and a much cleaner, modern look but also few rough edges. In particular, some Labs features may look a little strange in the new themes. We plan to fix these issues as we roll out changes in the coming months. You can also expect some updated themes that embody the same design principles but are better suited to working in a dark environment, use a different color palette, or include the illustrations that we know many of you love to see around your inbox.

Look out for these and other new features over the next few months. In the meantime, try out the new themes as a preview of the future of Gmail and let us know what you think.

P.S. Like Gmail, Google Calendar is also getting a new look. You’ll see it automatically within the next few days so there’s no need to turn it on, and we’ll also continue to make improvements there in the coming months. Details about the current changes to Calendar can be found in the Calendar help center.