The Google Assistant is appearing in more and more living rooms, so I decided it’s a good moment to start developing my first app for the Google Assistant. I decided to develop the Curacao Party app for the Google Assistant, so everyone may be able to ask the Google Assistant which parties are happening on the island today or tomorrow!

Everyone with a Google Assistant can use the app, simply by saying “Talk to Curacao Party”. There is no need to pre-install the app on the device, a big benefit in my opinion!

The Google Assistant is already available for lots of devices, like most Android devices, the Google Home and Android TV’s. This makes it possible to develop an app for over billions of devices.

Creating a project

Before you’re able to start developing your first actions, you need to create a new project on the Actions on Google Console.

You can connect your project with an existing project on Firebase, so you can get the benefits of Firebase Storage and Firebase Cloud Functions.

Intents

When the setup of your project is done, you can start with developing your first intent. An intent is a flow the user can go through.

There are two intents by default, which are the welcome intent and the fallback intent. The welcome intent is the intent that will be triggered as soon as a user says: “Talk to <your app>”. In the welcome intent, you can welcome the user and describe the user what it can do with your app.

The fallback intent is triggered when no intent action is available for your flow. Most of the time, this is an answer like “Sorry, something went wrong, please try again”.

I used DialogFlow to add new intents. As I developed an app for Curacao Party, I created the ‘parties’ intent. In that intent, I added multiple ways to ask which parties will be happen on the island for today or tomorrow.

Fulfillments

Sometimes you’re able to return static answers for a question, but most of the time you may need to do a network request to an API or database to get the answer for the question.

By enabling “Enable webhook call for this intent”, you can develop custom actions written in NodeJS which are hosted at Firebase Cloud Functions. I wrote a small script which sends a request to the Curacao Party API to request parties for today or tomorrow. From then, I parse the JSON and return a text the Google Assistant can speak to the user.

A simple example to add text to the agent that needs to be spoken by the Google Assistant, is written below:

function welcome(agent) {
    agent.add("Hello, this is an easy example without logic");
}

intentMap.set('WelcomeIntent', welcome);

Using intentMap, I connect the function to the WelcomeIntent. As soon as the WelcomeIntent is triggered by the user, the function will be triggered, where I can do some logic before the assistant needs to return an answer. For example, it is possible to write a network call which makes it possible to get data from an API and when that is finished, it can be add to the agent, so the Google Assistant can pronounce it!

Release the app

I decided to first release my app only in English. The review process was easy. The first time, my app was declined, because I selected the wrong category for the app and also forgot to add a valid privacy link. After I solved those issues which were not related to the functionality of the app, the app was accepted by Google.

When an app is accepted, it will take about three hours to deploy. After that, everyone is able to use your app with the Google Assistant!

Receive a free Google Home

Google has a special community program. When you release your first Google Assistant app, you will receive a mail from Google that you can apply for a free Google Assistant t-shirt. You also receive 200$ dollar Firebase credit each month in the first year.

You can also receive pins for crossing special milestones. These milestones are:

  • Getting initial traction, get more users to your app
  • Keeping users engaged, get your users triggered to come back
  • Taking your Action global, translate your app to multiple languages

As soon as you reach one of those, you will receive a pin by post and also a free Google Home. I translated my app to Dutch and received a free Google Home and the actions global pin!