Gmail Adds Actions - Do You Want to Use Them?
Written by Mike James   
Tuesday, 21 May 2013

The idea of including standard actions within emails might be a good one - but whose standard? Actions turn email into powerful interactive mini-apps and a source of valuable information for Google. So should you employ this proprietary technology? 

 

When you start to analyse it, you have to conclude that this is a strange idea and it is difficult to know if it is good or bad.

Email is an old technology, but still a vital one. Some users are so worried about security that they restrict email to plain text and don't even accept HTML email. In general the only active components of an email are clickable links - JavaScript is almost universally disabled. What this means is that it is difficult to create an "active" email of any sort. Now Google has provided a way to add actions to an email - but only if it is delivered to a Gmail account.

The idea is based on using schema to define the data and the action that should be applied. Schema, or microformats, are a relatively old idea designed to make it easier to extract data from web pages. The idea is that you label the data using HTML attributes so that search engines can recognize a name and address or telephone number, say. Microformats are very simple until, of course, the standards people get hold of them and then they seem like rocket science. 

Google now wants you to include schema within your emails so that it can include your emails in search results. For example, if you list all of your flight bookings then, as long as these are entered as schema within your emails, Google Now or Search will be able to answer questions about which plane, when and where. However, coding up your reservations in all of your emails is not likely to catch on - unless there is a more immediate payoff.

What Google has done is to invent some schema for actions within email - although these aren't standardized as yet. For example:

<script type="application/ld+json">
{
  "@context": "schema.org",
  "@type": "Event",
  "name": "John's Birthday Party",
  ... information about the event ...
  "action": {
    "@type": "RsvpAction",
    "actionHandler": {
      "@type": "HttpActionHandler",
      "url": "https://events-organizer.com/rsvp?
                                  eventId=123",
      "method": "POST",
      "requiredProperty": "rsvpStatus",
    }
  }
}
</script>

This inserts data using JSON/LD about a birthday party that you are being asked to attend. When Gmail sees this within the email, it displays a button you can click to RSVP. In response to this click Gmail then shows you a dialog box with a set of standard options. The example above is very simple, but you can specify much more information about the party, date, location and actions for yes, no and maybe responses:

 

googleactions1

 

When the user clicks on one of the response buttons within the dialog box, an HTTP is sent to the URL included in the action. Your server then has to process the data in any way it likes. 

You can see that this sort of facility has the potential to define workflows. If you are an airline company you could send a client an email confirming their flight reservations, remind them to check in, and when they have taken their flight send an email to gather a review. 

Currently only a small number of actions have been defined but more are to follow. There are two types of action - In-app actions and Go-To actions.

In-App actions are handled by Gmail and usually result in an HTTP request to your server. Currently there are three types of In-App actions:

  • One-Click actions correspond to a single button that the user can click to deal with the email. At the moment there are two on-click actions:
  • ConfirmAction - used to say yes or ok
  • SaveAction. - used to say keep whatever is the topic of this email, a song, a coupon, etc.
  • Review actions display a small dialog box complete with a ratings widget. The user can add a rating and a short text review which is sent to the server when the user clicks the Post Review button.

googleactions2

  • RSVP actions display the sort of multi-button dialog box as shown above and allow the user to respond to an invitation. 

Go-To actions allow for more complex interactions. A single button takes the user to a specific page on the website where the request can be dealt with. For example, you could include a check-in button or a donate button which takes the user to a web page where they can complete the interaction. 

This all sounds very exciting, but if the email you construct complete with a schema isn't read using Gmail then the action doesn't happen because the schema is ignored. What this means is that if you are, say, building a car reservation system using email confirmations you need to make your email work on Gmail and non-Gmail systems. However, you could do this simply by including standard URL links to web pages that do the same job so it isn't a huge problem. 

If you want to test the new actions feature then it is being rolled out over the next few weeks. You can test it by sending yourself an email containing a schema. Gmail allows emails from and to the same account to just work.

If you want to use the facility for real, you will need to register with Google. At the moment this registration seems to be a manual process and you have to supply a lot of data about yourself and the email that you are going to send. It seems that you have to register for each and every email you are going to send - so this isn't a particular practical process should actions become popular. In addition, emails have to be authenticated using DKIM or SPF, i.e. you have to sign your emails and you can't use actions on promotional bulk email. 

So Google seems to have total control of actions in the name of keeping action spam out of the picture. 

 

 

googleactions3

 

The Google Apps developer blog lists companies that intend to start using actions.It is also worth remembering that if Google can get a lot of companies to send action emails it makes it much easier for it to extract the information it needs to personalize search and Google Now.

If you are considering it then you need to keep in mind that this is very much a proprietary Google extension to email, despite the noises  it is making about standardizing the schema. Also remember how quickly Google drops a service that no longer fits with its view of the future.  

More Information

Introducing Actions in the Inbox, powered by schemas

Add Schema.org markup to emails

Related Articles

JSON Linked Data       

New Google Apps Script Features       

Gmail, Spreadsheets and Google App Script       

Dealing With Forum & Mailing List Spam      

How Google Took Over My Digital Life       

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Banner


Fermyon's Spin WebAssembly Version 3.0 Released
26/11/2024

The open source developer tool for building, distributing, and running serverless WebAssembly applications reaches version 3.0. What's new?



Pico 2W Announced But There Is A Surprise!
25/11/2024

Raspberry Pi released the Pico 2 a few months ago and we have been waiting for the Pico 2W since then. But Pimoroni beat them to the draw with the Pico Plus 2W based on the RM2 radio module and hinted [ ... ]


More News

Last Updated ( Tuesday, 21 May 2013 )