There is no denying that Google Assistant is a fantastic virtual assistant with some really great features and very natural interactions. From checking facts on the web, to setting timers, to launching apps, and sending messages, it can help with a lot of stuff!
But that’s not to say it’s perfect. There are some features that many would like to see come to Google Assistant.
Good news! With just a little effort and no real coding chops, you can actually create your own apps and features from scratch. Keep reading, we’ll show you how!
Introducing Actions on Google
“Actions on Google” is what Google calls its platform for developers that want to extend the capabilities of Google Assistant. There are several ways it allows you to do this and the coolest part is that much of it won’t require any coding at all. Instead, you have the option to build projects from ‘templates’, letting you build simple quizzes or flash cards for study! This process takes minutes and it’s definitely a good way to impress friends and family.
How to build Google Assistant apps in minutes
- Trivia apps
- Personality quiz apps
- Flash card apps
Whichever you choose, you’ll begin the same way by going to the Actions Console. Click ‘Add/import project’ and then type the name of your project and enter your country/region.
I’m going to call my app ‘Actions Example’ and as I’m based in the UK, I’ll choose that option for my region. You’ll notice at this point that there is a limit to how many apps you can create before you need to request an increase.
Once you’re happy with this setup, click ‘Create Project’. Now you have a few options for getting started which present you with different ways to build your app. The easiest way for beginners is to choose from the templates we mentioned earlier. Let’s start out with the ‘Trivia’ option.
On the next page, you’ll get to choose the ‘personality’ for your app. I’m going to pick ‘Beeps the Robot’, which I initially read as ‘Creeps’.
For the next part, you’ll see that we need to create a spreadsheet in Google Docs and then import it. For the quiz, you need a column for:
- The question
- The correct answer
- The incorrect answer
- Another incorrect answer
- Follow up
So, for our example, let’s make a little quiz about Android:
Note that it’s better not to create your own sheet here (in which case formatting becomes very important), but rather to click on ‘Make a copy of the prefilled Google Sheet for editing’. Then confirm by clicking ‘Make a Copy‘. Now you can edit the fields as you see fit.
Think carefully when choosing how to phrase your questions and answers. For more on that, check out Google’s Best Practice guidelines.
Notice there is also a configuration tab, which is where you’ll define the name of your app. You can also separate synonyms by using the ‘|’ symbol. Don’t use commas or other special symbols in your answers and try to keep your questions clear and simple to follow.
What you’re actually doing here is creating a voice ‘UI’. You need to think about what the expectations of your users are and how you are going to deal with unexpected behaviors to offer a seamless experience.
Once you’ve linked your spreadsheet, just click ‘Create App’ and you should see a message telling you the app has been created! It will usually take a second for the page to refresh. From there, you can then begin to test your app either through the simulator (which works via the browser) or on any device logged in to the same account.
At any point, you can then change the app’s content by clicking Actions > Edit Actions.
For those who want to get a little more adventurous, you can add features like different categories, different grade levels, and even custom audio files. Check out the full document to learn about that stuff.
There are more features you can add, including different categories, different grade levels, and even custom audio files.
Though the process is pretty straightforward, it’s not flawless. While writing this post, I ran into some trouble due to mysterious authentication issues with my main Google account. I had to start again with a new account I’d built from scratch! Later, Google Assistant disappeared entirely from my phone…
While building these template projects is easy and fun, it’s a somewhat limited experience. Thankfully, for those that aren’t afraid to get their hands dirty with some light coding, there are other options available.
One option is to head over to Dialogflow.com and then sign up (it’s free!). Click on ‘Create Agent’ and then you’ll be taken to a page where you can add intents. These are simply actions and responses that are invoked via voice command. Adding intents allows you to define new interactions by inputting the text that your user might say, the actions that this might trigger, and the responses that your app may give. You’ll notice that there is already one here when you create your new app, which is the default greeting for the user.
Entities, meanwhile, act like ‘objects’ in code, which can represent things like conversation topics, or perhaps actual real-world objects that you want to manipulate or retrieve information about. This along with the parameters, allows you to use dynamic variables to provide more useful information and functionality.
Integrations meanwhile allow you to add support for Twitter or a range of other apps on your device. This will let your actions do smart things like post to social media.
What’s cool is that you can test this functionality right inside the same console window by typing in the window in the top right. You’ll then see the response and check everything is working as it should be.
Take a look at this very simple example. Saying ‘Hello’ gives us one of two answers, ‘Why hello there’ or ‘Yo yo yo’.
It will take some experimentation and further reading before you can create meaningful apps and tools, but for that you should read the official documents from Google.
We’ve looked at two ways you can begin building your own Assistant apps, but there are even more methods than that. One is to use the Actions SDK, which lets you build actions locally with command line tools. Another is to use Converse.AI, which allows you to easily build speech and ‘rich media actions’ for the assistant.
How about creating a tool to assist you with some revision?
For messing around, adding useful functionality, or even just impressing guests, making your own Actions on Google apps can be fun and useful.
For those interested in distributing their creations, actions need to be submitted to Google for approval. From there, users will then be able to use your app with the right expression while talking to Google Assistant. Nothing needs to get installed and if the user doesn’t know your app’s name, then Google will suggest installing it when they use a relevant instruction. You can find out more here.
There’s a lot more to unravel here, but hopefully this introduction has given you the taste you need to jump in and start making progress.
So, what do you think? Is this an option you can see yourself using? Which route would you take as a developer? What applications can you think of? Sound off in the comments below!