Google Assistant is an AI-powered virtual assistant developed by Google. There are currently two ways to engage in two-way conversation with the Google Assistant:
To engage with a Google Assistant, you can directly talk or write to it. Currently, there are a variety of actions that you can use your Google Assistant for:
Yes, anyone can create an app for the Google Assistant! We’ll help you get started with Google Actions and create an app in just a few clicks. You don’t even need to know how to code, how cool is that?
You’ll need:
Open the Actions console and click on “New Project”. Let’s call our new project “Pivott-Actions”. You can also go ahead and choose a language for your action, as well as a country or region.
Then it’s time to choose the kind of action you want to build. Currently, there are six types of actions:
Google Actions will then ask “how do you want to build it?”. Let’s go for a Blank project. Because the best way to learn is to start from scratch. So click on Start building and let’s build our very first action!
Before moving forward, here are some key terms you’ll need to understand to be able to start a conversation.
To start a Conversation, start with finding a display name. Note that a display name is mandatory for it to be able to go to productions, but is not necessary for a test application. The display name has to be more than a word, and needs to include a prefix. Let’s call ours “The Pivott Action” for now. Users will be able to invoke your actions by saying: “Hey Google, talk to The Pivott Action”.
Click save. Perfect! We can now start adding a main invocation: click on main invocation on the menu on the left. In the YAML code editor, replace the text “Start building your action by defining main invocation.” in the speech field with a message of your choice. In this example we will go for “Hello! Thank you for your interest in Pivott. We are a very ambitious team, and always happy to greet newcomers.” Then click on the save button.
Congratulations, you just finished the first two steps and can now test your newly made action! To do that, click on “test” in the upper menu and then type (or click on the microphone and say) “Talk to the Pivott Action”. If everything goes well you should hear: “Alright. Let’s get the test version of The Pivott Action. Hello! Thank you for your interest in Pivott. We are a very ambitious team, and always happy to greet newcomers.”
Got it? Great! Then let’s take it up a notch and complicate our action a bit more. In the next step, we’re changing our action from just one answer to more of a conversation.
Go back to “develop” and back to Main invocation. On the bottom right, you’ll see “transition”. Let’s change it to a new scene called “Start”. (see below)
Save and then go to the scene you just created by clicking on the left menu. Let’s add a prompt on enter, by clicking on “on enter” and checking the “send prompt” box. Replace the speech text with “What would you like to know about Pivott: Our services, Our clients, what job opening do we currently have or our contact info?” Then hit save again.
To add suggestions, click on “insert suggestion” on the bottom right and add as many suggestions as needed. In this example we added four: “Services”, “Clients”, “Job openings” and “Contact”.
For Google to recognise these suggestions, we need to add them as “Custom intent”. User intent defines user input that the Action can understand. You define the training phrases for these intents. When users say something that matches or is similar to a training phrase, the corresponding intent is matched. – Source : Google Codelabs
In the menu on the left, you can see “Custom intent”. Click on the little “+” sign, We’ll start with services, so let’s call this custom intent “services”, and click on it. Now we’ll add training phrases, which are synonyms or examples of what a user could possibly say to match the word. So for example, if our intent was “yes” a training phrase would be “I would”, “tell me” or “of course”. But don’t worry about “yes” or “no”, these two are already default in the system intent and you don’t need to set them up. Isn’t that great? For services, we used “How can you help?”, “What do you do?” “help” and “services”. Don’t forget to save!
Perfect! Now that Google understands what “services” is about, let’s add it to our start scene. Go to start, click on the little “+” sign next to “add intent handling”, then send prompts to add an answer. Replace the speech field with “We are happy to help you with our services, Creative & content marketing, Social media marketing, Dynamic creative optimisation, data & Automation, Digital Production and performance marketing.” In the transition field you can select “End conversation” to end the conversation. Then save.
You can do the same for all other suggestions. Once done, don’t forget to test your action.
And voilà! You can now deploy your creation and let anybody use it! Congratulations, you just built your very first Google Assistant app. Want to know more? Read further about it on codelabs, or contact us and we’ll gladly help you out!
David Beebe