This tutorial shows you how to get started developing for Google Home using a Google Cloud Function.

Prerequisites

Getting Started

Clone the Super Simple Google Action repo:

$ git clone https://github.com/bespoken/super-simple-google-action

Go to the root level of the sample:

$ cd super-simple-google-action/

Configure your api.ai Action

For a detail walkthrough on setting up a Google Action with api.ai, go here.

Start bst proxy

For Google Cloud Functions, the bst proxy command, in addition to setting up the proxy, will run your function for you and even reload it on changes.

This will start the function:

$ bst proxy function index.js simpleFunction

Try it out

You can test things out right inside api.ai - just enter "Hello" into the "Try it now" field on the top-right.

You should see the request and response come across the console where the bst proxy is running, like so:

Or you can try it in the Google Actions Web Simulator.

Next Steps

You can now start adding functionality to your action. To learn more about working with Google Actions, see the official documentation

You can also try it out on a Google Home, as long as it is registered with your account. Just say "Talk To {Your Invocation Name}" to use it.