Get image object

Action ID
actions.intent.GET_IMAGE_OBJECT
Description

Search and view images from a profile or about a topic. Filter images by topic description using the imageObject.about.description intent parameter to present the most relevant ones to the user. Determine the profile by author using the imageObject.author.name intent parameter, if applicable.

For images uploaded or created in a certain time period, that time period is provided using the imageObject.temporalCoverage intent parameter.

For images uploaded or created based on a tagged location name, the location is provided using the imageObject.contentLocation.name intent parameter.

Locale support

Functionality Locales
Preview creation using App Actions test tool en-US
User invocation from Google Assistant en-US

Example queries

The following fields represent essential information that users often provide in queries that trigger this built-in intent:

imageObject.about.description
imageObject.author.name
imageObject.temporalCoverage
imageObject.contentLocation.name

Other supported fields

The following fields represent information that users often provide to disambiguate their needs or otherwise improve their results:

imageObject.@type
imageObject.about.@type
imageObject.author.@type
imageObject.contentLocation.@type

Android widgets and slices

We recommend implementing Android widgets for this built-in intent. A widget presents information or interaction options from your app to improve user engagement in Google Assistant. Widgets are available for App Actions implementations using shortcuts.xml.

If you have a legacy App Actions implementation using actions.xml, use Android slices instead. We recommend migrating your implementation to shortcuts.xml to take advantage of widgets fulfillment and other improvements.

Supported text values by field





Inventory availability by field



Sample XML files

For information about the shortcuts.xml schema, see Create shortcuts.xml.

Handle BII parameters

shortcuts.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
  <capability android:name="actions.intent.GET_IMAGE_OBJECT">
    <intent
      android:action="android.intent.action.VIEW"
      android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
      android:targetClass="YOUR_TARGET_CLASS">
      <!-- Eg. temporalCoverage = "2017-06-01/2017-06-30" -->
      <parameter
        android:name="imageObject.temporalCoverage"
        android:key="temporalCoverage"/>
      <!-- Eg. authorName = "John Doe" -->
      <parameter
        android:name="imageObject.author.name"
        android:key="authorName"/>
      <!-- Eg. description = "new year" -->
      <parameter
        android:name="imageObject.about.description"
        android:key="description"/>
      <!-- Eg. contentLocationName = "Chicago" -->
      <parameter
        android:name="imageObject.contentLocation.name"
        android:key="contentLocationName"/>
    </intent>
  </capability>
</shortcuts>
      

actions.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.GET_IMAGE_OBJECT">
    <fulfillment urlTemplate="myapp://custom-deeplink{?temporalCoverage,authorName,description,contentLocationName}">
      <!-- e.g. temporalCoverage = "2017-06-01/2017-06-30" -->
      <!-- (Optional) Require a field eg.temporalCoverage for fulfillment with required="true" -->
      <parameter-mapping urlParameter="temporalCoverage" intentParameter="imageObject.temporalCoverage" required="true" />
      <!-- e.g. authorName = "John Doe" -->
      <parameter-mapping urlParameter="authorName" intentParameter="imageObject.author.name" />
      <!-- e.g. description = "new year" -->
      <parameter-mapping urlParameter="description" intentParameter="imageObject.about.description" />
      <!-- e.g. contentLocationName = "Chicago" -->
      <parameter-mapping urlParameter="contentLocationName" intentParameter="imageObject.contentLocation.name" />
    </fulfillment>

    <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
    <fulfillment urlTemplate="myapp://deeplink" />
  </action>
</actions>

Use web inventory

imageObject.author.name is a field that supports web inventory. In the following example, Google Assistant performs a web search for the user query and determines the fulfillment URL. Assistant filters for search results that match the provided urlFilter value of https://www.mywebsite.com/link1/.*.

shortcuts.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
  <capability android:name="actions.intent.GET_IMAGE_OBJECT">
    <intent
      android:action="android.intent.action.VIEW"
      android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
      android:targetClass="YOUR_TARGET_CLASS">
      <parameter android:name="imageObject.temporalCoverage">
        <data android:pathPattern="https://www.mywebsite.com/link1/.*"/>
      </parameter>
      <parameter android:name="imageObject.author.name">
        <data android:pathPattern="https://www.mywebsite.com/link2/.*"/>
      </parameter>
      <parameter android:name="imageObject.about.description">
        <data android:pathPattern="https://www.mywebsite.com/link3/.*"/>
      </parameter>
      <parameter android:name="imageObject.contentLocation.name">
        <data android:pathPattern="https://www.mywebsite.com/link4/.*"/>
      </parameter>
    </intent>
  </capability>
</shortcuts>
      

actions.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.GET_IMAGE_OBJECT">
    <!-- Use URL from entity match for deep link fulfillment -->
    <!-- Example: url = 'https://www.mywebsite.com/link1/item1' -->
    <fulfillment urlTemplate="{@url}" />

    <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
    <fulfillment urlTemplate="myapp://deeplink" />

    <!-- Define parameters with web inventories using urlFilter -->
    <parameter name="imageObject.author.name">
      <entity-set-reference urlFilter="https://www.mywebsite.com/link1/.*" />"/>
    </parameter>
  </action>
</actions>

JSON-LD sample

The following JSON-LD sample provides some example values that you can use in the App Actions test tool:

{
  "@context": "http://schema.org",
  "@type": "ImageObject",
  "about": {
    "@type": "Thing",
    "description": "new year"
  },
  "author": {
    "@type": "Person",
    "name": "John Doe"
  },
  "contentLocation": {
    "@type": "Place",
    "name": "Chicago"
  },
  "temporalCoverage": "2017-06-01/2017-06-30"
}