Imagining the Big Baller League.

LaVar Ball is creating his own basketball league for amateur basketball players. So we looked into the GSC crystal ball, to predict what this league will look like.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How To Create a Skill for Amazon Alexa Using Google Sheets And Storyline

Imagine an Alexa skill that gives you some facts. It’s a simple skill — you just launch it, and it tells you a fact on some topic.

Simple Alexa skills for Amazon Echo share the same facts every time you launch them. But there are skills, where creators update content on a regular basis. We call them dynamic skills.

In this article, I’ll explain how to make dynamic Alexa skills using Storyline, Google Sheets, and random content feature.

The reason people love dynamic Alexa skills is that they are not dull. If you hear the same content every day from your Amazon Echo, you’re not going to continue using the skills after a few times.

There are a lot of use cases for skills with dynamic content. You can get facts about your favorite blogger, university, or even about Amazon. Alexa skills with dynamic content can help you choose a child name or give you a different quote every day.

For skill creators, adding dynamic content to their skills solves a big problem: it’s easier to add, delete, and manage your content in a convenient interface. Google Sheets is an excellent example of such an interface.

The way creators used to make dynamic Amazon Alexa skills in Storyline was to create a server, put content there, connect it with Storyline using API Request feature, and write a function to randomize responses from that server. This process was clunky and hard to follow. Here’s how to make it easy.

Let’s imagine I want to create an Alexa skill that shares a random fact about Google. The first thing I need to do is to find content.

After I find some facts about Google, I paste them into a spreadsheet.

To send your data from Google Sheets to Storyline you need to convert it to JSON — a lightweight format for transferring data.

Here’s how Storyline API Request feature works: you make a GET request to some server, it returns a JSON. Then you take some data out of it, and Alexa pronounces that data to the user.

We are going to use native Google Sheets feature to convert the spreadsheet to JSON.

First, you need to publish your spreadsheet to the web, using File -> Publish To Web in your spreadsheet.

After you publish your spreadsheet, you need to get your spreadsheet ID. It is a part of your spreadsheet URL. In our example, the URL of the spreadsheet is:

From this URL, spreadsheet ID is:

Now you can access your simple JSON using the following URL:

If you follow that link we created below, you’ll see a real JSON with data from your spreadsheet.

After you finished accessing your JSON, you need to create an Alexa skill in Storyline to be able to grab data it and use it in your Alexa skill.

My example Alexa skill in Storyline looks like this.

Here I have a Welcome Block, which starts when a user opens the skill. In this block, there are two messages from Alexa:

And two default user replies required by Amazon: “help” and “stop.” Simply put, user replies are just options what user can say to this skill.

I also have a fact block here, which is a default block that I added using the New block button on the top right.

In the fact block I have an API Request, which is called get a fact. I also have a {{fact}} step, which is a variable I created to store the fact that I get from a Google Spreadsheet.

JSON API request in Storyline.

API Request in Storyline consists of several parts:

The name of your API Request does not really matter; I usually choose something meaningful that I can easily find when my skill is big. I have “get a fact” as a name of my API Request here.

URL here is the same URL to JSON format of my spreadsheet I created during the Step 2:

A field with variable contains a path to a fact from our spreadsheet JSON and a variable, where we store that fact to use it in Storyline.

Here’s what’s inside of it:

fact is a variable that stores the fact we grab from the Google sheet. We are going to use it in the diagram of our skill.

feed.entry contains the content or our spreadsheet. In other words, cells.

Here’s how it looks if you toggle all fields of a JSON:

Then we can toggle entry field and go one level deeper. Entry here is an array of objects, and each object looks like this:

The field we need is $t, which is located in thetitle.

Here’s how the whole line looks like combined.

At this part, you should already have a working Alexa skill that grabs the first fact from your spreadsheet and pronounces it in Storyline. The next step is to make it dynamic.

To access the first element of your spreadsheet, you use .0 key. To access the second cell you use .1.

The whole field with variable who grabbing a random fact from a spreadsheet should look like this (don’t forget a semicolon in the end):

By doing this, you make Storyline understand that you want to access a random element of that array.

If you followed the tutorial, at this moment, you should have an Alexa skill that grabs a random fact about Amazon from a spreadsheet and uses it in Storyline.

You can play with it right in the browser or publish to your Echo device (and Amazon App Store, for sure).

You can also share an interactive view-only preview of your skill with a friend or colleague so that they can play with it too. To do that, click the Share button at the top, and toggle Enable view-only sharing tumbler.

Here’s how my Google Sheet Alexa skill looks like in Storyline:

Thanks for reading! 🙌

Best, Storyline team.

Add a comment

Related posts:

El sexo compartido es para sabios

Nos cae un poco gordo este afán de discutir si una práctica sexual es más o menos natural. ¿Qué tiene que ver lo natural con las actividades humanas? En todo lo que hacemos, el artificio es una…

How Experiences and Associations In Our Youth Mold and Influence the Outcome of Our Lives

When I was a young boy, maybe 7 or 8 years old, I would have to fetch the cows to bring them to the barn to milk. It was always the same time every day. At that same time, almost every day, an event…

Weekly Journal Entry 7

Plutarch is worried that readers won’t take his stories about women seriously because during his time women were not seen as equal to men. In the passage, he gives examples, like art being seen as…