Make your emails stand out in Inbox

Thursday, October 30, 2014 | 11:30 AM

As we announced last week, Inbox is a whole new take on, well, the inbox. It’s built by the Gmail team, but it’s not Gmail—it’s a new product designed to help users succeed in today’s world of email overload and multiple devices. At the same time, Inbox can also help you as a sender by offering new tools to make your emails more interactive!

Specifically, you can now take advantage of a new feature called Highlights.

Exactly like it sounds, Highlights “highlight” or surface key information and actions from an email and display them as easy-to-see chips in the inbox. For example, if you’re an airline that sends flight confirmation emails, Highlights can surface the “Check-in for your flight” action and display live flight status information for recipients right in the user’s main list. The same can apply if you send customers hotel reservations, event details, event invitations, restaurant reservations, purchases, or other tickets. Highlights help ensure that your recipients see your messages and the important details at a glance.

To take advantage of Highlights, you can mark up your email messages to specify which details you want surfaced for your customers. This will make it possible for not only Inbox, but also Gmail, Google Now, Google Search, and Maps to interact more easily with your messages and give your recipients the best possible experience across Android, iOS and the web.

As an example, the following JSON-LD markup can be used by restaurants to send reservation confirmations to their users/customers:

<script type="application/ld+json">
  "@context": "",
  "@type": "FoodEstablishmentReservation",
  "reservationNumber": "WTA1EK",
  "reservationStatus": "",
  . . . information about dining customer . . .
  "reservationFor": {
    "@type": "FoodEstablishment",
    "name": "Charlie’s Cafe",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "1600 Amphitheatre Parkway",
      "addressLocality": "Mountain View",
      "addressRegion": "CA",
      "postalCode": "94043",
      "addressCountry": "United States"
    "telephone": "+1 650 253 0000"
  "startTime": "2015-01-01T19:30:00-07:00",
  "partySize": "2"

When your confirmation is received, users will see a convenient Highlight with the pertinents at the top of their Inbox, then can open the message to obtain the full details of their reservation as shown above.

Getting started is simple: read about email markup, check out more markup examples, then register at and follow the instructions from there!

by Shalini Agarwal, Product Management, Inbox by Gmail

Introducing Add-ons for Google Forms

Thursday, October 23, 2014 | 12:51 PM


Cross-posted from the Google Apps Updates blog.

Google Forms is a free and simple way to collect information — from quickly polling your friends about who'll be attending your trip to the haunted hayride, to getting thousands of responses to an awareness survey for work.

Over the last few months, Forms has been getting a bunch of updates to help you make good looking surveys, like new theme choices and the ability to create your own personalized themes.

To give you even more flexibility and options, we’re introducing add-ons for Forms—new tools, created by developer partners, that deliver even more features to your surveys (just like add-ons for Docs and Sheets).

Add-ons bring handy extras to your survey building experience, like setting a survey end date, sending custom emails based on responses, storing lists of choices that you frequently add to questions, and more.

You can access Add-ons from the “Add-ons” menu in Forms, or by directly visiting the Forms add-on store.

Here are just a few of the growing list of add-ons that you can use today with Google Forms:

  • formLimiter: Close your survey automatically, after a maximum number of responses is reached, or at a date and time of your choosing. 
  • Ultradox Trigger: Create custom emails, reports, invoices, newsletters, etc., based on information that people enter into your form. 
  • Form Values: Store and pull from lists that you use regularly in Forms, like a list of staff, students, rooms, resources or anything you want. 
We hope these new tools make your Forms creation process even easier and more helpful--and stay tuned for more--our developer partners will be launching even more add-ons in the coming weeks. 

PS: If you’re a developer with ideas for creating your own add-on for Forms, here’s some documentation to get you started.

Posted by Saurabh Gupta, Product Manager

Reminder: ScriptDB is shutting down soon

Monday, October 13, 2014 | 8:56 AM

Back in May, we announced that ScriptDB, an experimental database in Google Apps Script, would be turned off on November 20, 2014.  Hopefully you've already migrated your data to another database, but if not, now is the time to check out alternatives like Cloud SQL. The migration guide explains how to export your data from ScriptDB.We’ve also improved the documentation for connecting to external databases through JDBC, makingit easier for you to set up Cloud SQL with Apps Script.

To summarize: ScriptDb will shut down on November 20, 2014, so please ensure you migrate your scripts before then!

Posted by Saurabh Gupta, Product Manager, Google Apps Script

Updates on Authentication for Gmail IMAP, POP, and SMTP

Monday, October 6, 2014 | 11:54 AM

Labels: ,

We’d like to highlight some recent and upcoming changes around authentication for Gmail IMAP, POP, and SMTP.

Additional Scrutiny for Password Authentication 
As previously announced, Google has begun increasing the security checks that occur when logging in with a user’s Google password. This includes access via Gmail IMAP, POP, and SMTP-MSA. It does not apply when authenticating with OAuth 2.0 via the XOAUTH2 mechanism.

If the checks detect anything suspicious about a password login attempt, our servers may deny login and return an error message requesting that the user first login to Google through a web browser. They may also require the user to explicitly enable “Less Secure Apps” on their account. Applications that perform password authentication to IMAP, POP, or SMTP are examples of "Less Secure Apps".

We strongly encourage developers to use OAuth 2.0 (via the XOAUTH2 mechanism for IMAP, POP, and SMTP) in order to better protect their users.

XOAUTH support ends May 5, 2015 
The OAuth 1.0 XOAUTH authentication mechanism for Gmail IMAP and SMTP-MSA is deprecated and will stop being supported on May 5, 2015. Developers must migrate to XOAUTH2 in order to continue authenticating to Gmail after that date. You can migrate existing users without their intervention by following the instructions in this migration guide. Instructions for developing your XOAUTH2 code are in the XOAUTH2 documentation.

Posted by Jamie Nicolson, Gmail Software Engineer

Installable triggers in add-ons for Google Docs and Sheets

Wednesday, October 1, 2014 | 12:04 PM


Update (Oct 17, 2014): Add-ons can now also use time-driven triggers.

Earlier this year, we introduced add-ons for Google Docs and Sheets—packaged Apps Script projects that users can easily install from our add-on store to get extra functionality and features.
Since then, plenty of developers told us they were eager to add installable Apps Script triggers to their add-ons. We're happy to announce that now you can do just that, making it possible to respond to more user actions. For example, a spreadsheet add-on can now react when a user submits a response to a Google Form, or can call a method that requires authorization when a user edits a cell.
Add-ons can now programmatically create and manage these installable triggers:

  • Sheets add-ons can use the change, edit, open, and form-submit installable triggers.
  • Docs add-ons can use the (new!) open installable trigger.
To see the power of installable triggers in action, check out developer Romain Vialard's Yet Another Mail Merge, which has already been updated. The original YAMM lets users quickly personalize Gmail drafts by replacing placeholder fields with data from a spreadsheet. The new version uses a trigger to send an email whenever a form is submitted.
If you've worked with installable triggers before, you'll find that they behave a little differently in add-ons (for one thing, there are no pesky "Summary of failures" emails!), so be sure to check out the documentation.
Posted by Edward Jones, Googler

Sudoku, Linear Optimization, and the Ten Cent Diet

Tuesday, September 30, 2014 | 10:02 AM


Originally posted on the Google Research blog. Cross posted on the Google Developers blog

In 1945, future Nobel laureate George Stigler wrote an essay in the Journal of Farm Economics titled The Cost of Subsistence about a seemingly simple problem: how could a soldier be fed for as little money as possible?

The “Stigler Diet” became a classic problem in the then-new field of linear optimization, which is used today in many areas of science and engineering. Any time you have a set of linear constraints such as “at least 50 square meters of solar panels” or “the amount of paint should equal the amount of primer” along with a linear goal (e.g., “minimize cost” or “maximize customers served”), that’s a linear optimization problem.

At Google, our engineers work on plenty of optimization problems. One example is our YouTube video stabilization system, which uses linear optimization to eliminate the shakiness of handheld cameras. A more lighthearted example is in the Google Docs Sudoku add-on, which instantaneously generates and solves Sudoku puzzles inside a Google Sheet, using the SCIP mixed integer programming solver to compute the solution.

Today we’re proud to announce two new ways for everyone to solve linear optimization problems. First, you can now solve linear optimization problems in Google Sheets with the Linear Optimization add-on written by Google Software Engineer Mihai Amarandei-Stavila. The add-on uses Google Apps Script to send optimization problems to Google servers. The solutions are displayed inside the spreadsheet. For developers who want to create their own applications on top of Google Apps, we also provide an API to let you call our linear solver directly.

Second, we’re open-sourcing the linear solver underlying the add-on: Glop (the Google Linear Optimization Package), created by Bruno de Backer with other members of the Google Optimization team. It’s available as part of the or-tools suite and we provide a few examples to get you started. On that page, you’ll find the Glop solution to the Stigler diet problem. (A Google Sheets file that uses Glop and the Linear Optimization add-on to solve the Stigler diet problem is available here. You’ll need to install the add-on first.)

Stigler posed his problem as follows: given nine nutrients (calories, protein, Vitamin C, and so on) and 77 candidate foods, find the foods that could sustain soldiers at minimum cost.

The Simplex algorithm for linear optimization was two years away from being invented, so Stigler had to do his best, arriving at a diet that cost $39.93 per year (in 1939 dollars), or just over ten cents per day. Even that wasn’t the cheapest diet. In 1947, Jack Laderman used Simplex, nine calculator-wielding clerks, and 120 person-days to arrive at the optimal solution.

Glop’s Simplex implementation solves the problem in 300 milliseconds. Unfortunately, Stigler didn’t include taste as a constraint, and so the poor hypothetical soldiers will eat nothing but the following, ever:
  • Enriched wheat flour
  • Liver
  • Cabbage
  • Spinach
  • Navy beans
Is it possible to create an appealing dish out of these five ingredients? Google Chef Anthony Marco took it as a challenge, and we’re calling the result Foie Linéaire à la Stigler:

This optimal meal consists of seared calf liver dredged in flour, atop a navy bean purée with marinated cabbage and a spinach pesto.

Chef Marco reported that the most difficult constraint was making the dish tasty without butter or cream. That said, I had the opportunity to taste our linear optimization solution, and it was delicious.

New Google Apps Activity API

Thursday, September 25, 2014 | 10:29 AM

This post was originally posted on the Google Developer Blog

Back in January, Google Drive launched an activity stream that shows you what actions have been taken on files and folders in your Drive. For example, if someone makes edits on a file you’ve shared with them, you’ll see a notification in your activity stream.

Today, we’re introducing the new Google Apps Activity API designed to give developers programmatic access to this activity stream. This standard Google API will allow apps and extensions to access the activity history for individual Drive files as well as descendents of a folder through a RESTful interface.

The Google Apps Activity API will allow developers to build new tools to help users keep better track of what’s happening to specific files and folders they care about. For example, you might use this new API to help teachers see which students in their class are editing a file or, come tax season, you might want to create a quick script to audit the sharing of items in your financial information folder.

Check out the documentation at We can't wait to see what you build!

Posted by Justin Hicks, Software Engineer, Technical Lead for Google Apps Activity API