Actions in the Inbox

One Click Actions

One click actions allow users to perform one-click operations directly from gmail without having to visit your website. One Click actions are performed by declaring an HttpActionHandler with your service URL. For more details about it, refer to Handling Action Requests.

A Confirmation Button in Gmail
"Add to Queue" one-click action in the inbox.

Use Cases

One Click actions currently supported in Gmail are:

Gmail also supports the RsvpAction and ReviewAction which have a more specific user experience.

Confirm Action

You may add a one-click confirm button to emails requiring users to approve, confirm and acknowledge something. Once the user clicks on the button, an http request will be issued from Google to your service, recording the confirmation. ConfirmAction can only be interacted with once.

The following declaration adds a ConfirmAction button to an email about an expense report:

Json-Ld

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "action": {
    "@type": "ConfirmAction",
    "name": "Approve Expense",
    "handler": {
      "@type": "HttpActionHandler",
      "url": "https://myexpenses.com/approve?expenseId=abc123"
    }
  },
  "description": "Approval request for John's $10.13 expense for office supplies"
}
</script>

Microdata

<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction">
    <meta itemprop="name" content="Approve Expense"/>
    <div itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
      <link itemprop="url" href="https://myexpenses.com/approve?expenseId=abc123"/>
    </div>
  </div>
  <meta itemprop="description" content="Approval request for John's $10.13 expense for office supplies"/>
</div>

Save Action

SaveAction can be used to describe interactions like saving a coupon or adding songs to the listen queue. SaveAction can only be interacted with once.

The following declaration adds a SaveAction button to an email about an offer:

Json-Ld

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "action": {
    "@type": "SaveAction",
    "name": "Save Offer",
    "handler": {
      "@type": "HttpActionHandler",
      "url": "https://offers-everywhere.com/save?offerId=xyz789"
    }
  },
  "description": "$5 meal at Joe's Diner"
}
</script>

Microdata

<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/SaveAction">
    <meta itemprop="name" content="Save Offer"/>
    <div itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
      <link itemprop="url" href="https://offers-everywhere.com/save?offerId=xyz789"/>
    </div>
  </div>
  <meta itemprop="description" content="$5 meal at Joe's Diner"/>
</div>

Specification

The following table lists all available properties for this type:

Property Type Description
description Text Snippet of text describing the contents of the email.
action Action (required) Actions supported for EmailMessage.
action.name Text The string shown to the user on the UI element tied to the action.
action.handler HttpActionHandler (required) Service or Application that may handle the action.
action.handler.url URL (required) URL to the handler that can perform the action.
action.handler.method HttpRequestMethod Whether to use HTTP GET or POST. GET is the default.
action.handler.requiresConfirmation Boolean If true, additional confirmation is required before the handler executes.
publisher Organization The entity responsible for publishing the message. Also accepts a string (e.g. "").
publisher.name Text Name of the Organization.
publisher.url URL URL of the Organization.
publisher.url/googlePlus URL URL of the Google+ Page for the organization.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.