Join the Actions on Google Developer Challenge to win a trip to Google I/O 2018 and more than 20 other prizes.

App Basics

Actions on Google lets you extend the functionality of the Google Assistant with actions. Actions let users get things done through a conversational interface that can range from a quick command to turn on some lights or a longer conversation, such as playing a trivia game.

To extend the Google Assistant, you build an app with these steps.

Create an Actions on Google developer project and API.AI Agent

Go to the Actions on Google Developer Console and create a developer project. The project lets you define metadata about your app and manage and track your app through the approval process. Once you have a project, you can create an action package that defines all your actions.

Create actions in an action package

You create actions in your action package by mapping an intent to fulfillment. Intents define entry points into your app's functionality and fulfillment is the web service that processes your intent

For example, say you wanted to build an app that could purchase some goods, check the status of orders, and to show some daily deals. You can define intents that are triggered by saying:

  • "Ok Google, talk to My Favorite Shoe Store"
  • "Ok Google, talk to My Favorite Shoe Store to purchase some shoes"
  • "Ok Google, talk to My Favorite Shoe Store to check on my order"
  • "Ok Google, talk to My Favorite Shoe Store to show me today's deals"

The action package might look something like this:

{
  "actions": [
    {
      "name": "MAIN",
      "intent": {
        "name": "actions.intent.MAIN"
      },
      "fulfillment": {
        conversationName: "my-favorite-shoe-store"
      }
    },
    {
      "name": "PURCHASE",
      "intent": {
        "name": "com.myfavoriteshoestore.PURCHASE",
          "queryPatterns": [    
            { "queryPattern": "purchase some shoes" },
            { "queryPattern": "buy some shoes" },
            { "queryPattern": "get some shoes" }
          ]
      },
      "fulfillment": {
        conversationName: "my-favorite-shoe-store"
      }
    },
    {
      "name": "ORDER_STATUS",
      "intent": {
        "name": "com.myfavoriteshoestore.ORDER_STATUS",
          "queryPatterns": [    
            { "queryPattern": "check on my order" },
            { "queryPattern": "see where my order is" },
            { "queryPattern": "find out where my order is" }
          ]
      },
      "fulfillment": {
        conversationName: "my-favorite-shoe-store"
      }
    },
    {
      "name": "DAILY_DEALS",
      "intent": {
        "name": "com.myfavoriteshoestore.DAILY_DEALS",
          "queryPatterns": [    
            { "queryPattern": "show me today's deals" },
            { "queryPattern": "give me the day's deals" },
            { "queryPattern": "learn about deals of the day" }
          ]
      },
      "fulfillment": {
        conversationName: "my-favorite-shoe-store"
      }
    }
  ],
  "conversations": [
    {
     "name": "my-favorite-shoe-store",
     "url": "https://myfavoriteshoestore.com/myfavoriteshoestore"
    }
  ]
}

Build and Deploy Fulfillment

When an action in your app is invoked, it calls fulfillment to start a conversation with users to fulfill the action.

In every request to your fulfillment, you receive the user input as a text string. To process the intent, you typically parse the text input and return a response. This back and forth exchange happens one ore many times until your fulfillment has enough information to complete the action.

Submit your app for approval and make it available to users