Before you go, check out these stories!

0
Hackernoon logoBuilding a Trivia App for Google Assistant by@melodysabouri

Building a Trivia App for Google Assistant

Author profile picture

@melodysabouriMelody Sabouri

UX Content Designer

Using a Template to Create a Trivia Voice App for The Office

I got interested in creating voice apps a few years ago when I was working on a portfolio project for fun. I made a voice app for Google Assistant that would order boba for me because I love boba. It was tough and challenging, but I had a lot of fun working on it and seeing the final product work was rewarding.

I’m someone with very little programming knowledge and working on my first voice app was pretty challenging, but I was ready for more.

As I went to create my next project on the Actions Console site, I found some templates. One of them was a trivia template. I figured using a template would be great for me as a beginner. I also wanted more practice on developing voice apps.

Making a Trivia App about The Office

I had to think about what I wanted my trivia app to be about, and The Office TV show immediately came to mind. It’s one of those shows I can watch countless times without getting bored. I’ve seen the same episodes so many times, that I would remember small details about it.

I thought, why not make a trivia app about The Office? It would be fun, and I would learn something new along the way.

Here are the steps you’ll need to take to create your own Actions on Google voice app. I’ll also be sharing my experience with my trivia app along the way.

Before You Start

Start to think about what type of trivia app you want to make. Do you know an impressive amount about certain topics? Obsessed with a TV series or a movie? You can use that to create the content of your trivia app.

Getting Started

I started out on the Actions Console site.

Once you’re signed in and on the site, you can start a new project. The first thing you have to do is name your project. This won’t be the name of your action, it’s more of a name for you to see to be able to identify this project.

Next, you’ll choose the type of Action you want to make. For a trivia app, you’ll want to choose “Game” and then choose “Trivia” next as the type of game.

Start With the Easy Stuff First

You’ll first land on the “Develop” tab where there will be 3 steps for you to complete in the Actions section. This is the main part of setting up your Action, and will likely take the most time to complete.

If you want to get some easy set up stuff out of the way, you can head over to the left side menu and set up your invocation. First, decide on the display name, which is what you’ll be saying out loud or typing into the app to start the Action. Next, choose the Google Assistant voice you want your Action to have.

For my app, my display name was Office Trivia.

The bottom two menu items on the left side are Account linking and Backend services. They might not be relevant to you (they weren’t for me), but feel free to check them out too.

Once you’re ready to dive in, head back to the Actions menu option on the left to return to the page you started on.

Start Putting Together Your Content

The main part of your trivia app will be the Google Sheets template. This template has sample questions and answers to help you see what type of content you need to replace it with.

Start out by making a copy of this template.

After I made a copy of the template, I erased the questions that were there and typed in my own questions. I also included 3 or 4 possible answers and indicated what the correct answer would be.

For me, this part was the most fun. I got to go through episodes of The Office and figure out what parts I wanted to use for my trivia quiz. Since I’ve seen seasons 1–5 the most, I decided to stick with those seasons only so I wouldn’t wear myself out. I tried to do the general questions by memory but I wanted to get some difficult questions in there too. So yes, I did rewatch seasons 1–5 for this project. For research.

In the configuration tab at the bottom, you can also choose how many questions you want the Action to ask per round. You can also choose if you want the questions to be randomized.

Once you have your content ready, paste the link to the Google Sheets into the second part of the first step.

Test your Action

After you upload your Google Sheet template, you can test your Action in the simulator. On the left side you can speak into your microphone or type in your invocation to get started. You can choose different surfaces like a smart display or phone to see how your trivia app will appear on them.

When I tested mine, it starts out with some intro music and a standard introduction to the app. Since I chose to randomize my questions in the template, the questions will appear in a random order. The simulator is an important step because it’s a way for you to make sure that everything works and is understandable.

The importance of testing

I had a problem with my question, “What was the brand of the women’s suit Michael wore in Season 3, episode 18 ‘The Negotiation’ ?” The options I had were Missterious, Missguided, and Misstique. The correct answer is Missterious, and when I said that answer out loud, the simulator didn’t understand it.

It was because the word Missterious didn’t have the correct spelling. That was the spelling they used on the suit label in the show, which is why I wrote it in that way. I hadn’t thought about spelling it like “Mysterious” so it would be understandable. It was great that I tested it and found out so I could change it. Otherwise, users wouldn’t be able to get past that question and have to leave the app.

Time to Deploy

After you finish testing, it’s time to Deploy. In the Deploy tab, you need to fill out more information about your Action before it’s ready for release. That includes the description, images, and additional invocation phrases.

Location and Surfaces

You’ll also choose the countries and regions you want your Action to be available in, and what surfaces you want your Action to work on. There’s also information needed if you have a company or brand, but I left these blank in my case.

Add a Privacy Policy

Another tricky part before releasing is that you need to have a privacy policy. I had never thought about one before, but the Actions Console makes it super easy for you to make one.

They give you a sample document you can copy. Once you’re in the document, all you have to do is change ${APPNAME} to the name of your Action, and ${DEVELOPER} to your name.

After you have that ready, you paste the link and you’re good to go. I have to admit, the language in their privacy policy was tough for me to understand. I did have to read it a few times, but I thought it was so much easier than having to come up with one on my own.

Submit it for Release

When you submit your action for release, it will get reviewed and tested to make sure everything looks good. Once that gets completed, you’ll find out if it got approved. If you follow their steps and read their rules, you should be good to go.

Once this happens, you get to interact with your trivia app as a user! This part was so much fun for me. I tested this on my Google Home device and it was such a cool feeling. Even though I didn’t write the code myself, I still put a lot of work into creating this trivia app. I felt very accomplished once it was live for people all around the world to use.

Final thoughts

Creating this Action for Google was a pretty easy process for someone like me who doesn’t have a lot of programming experience. Their steps made it all understandable and I liked that they didn’t throw everything at me at once. The hardest and most time consuming part for me was thinking of the questions and answers to ask.

I would’ve liked a little more customization to the introduction of the app and the voice. When I use my Google Home for normal interactions, the voice sounds more “human.” They speak a little faster and have natural sounding pauses. In the trivia app, it can sound a little robotic. I hope in the future we’ll be able to customize the voice even further to help make it sounds more human.

Also published at https://medium.com/swlh/how-to-create-a-trivia-voice-app-for-google-assistant-3b6c5d484ea9

Tags

Become a Hackolyte

Level up your reading game by joining Hacker Noon now!