Learn how to use Google Spreadsheets as a content management system (CMS) for your Alexa Skills and Google Actions with the Jovo CMS integration.
Watch the video here:
Right now, most people manage the content of their Alexa Skills and Google Actions in the code. This lets you start building out the functionality quickly without having to care about integrating external systems. Plus, Jovo offers an i18next integration that allows you to localize content right from a JSON file.
However, with growing teams working on voice apps for Alexa and Google Assistant, changes are becoming higher that content is managed from a variety of people that don't necessarily have access to the code. Also, for adding fresh new content, or even doing minor changes, redeploying the complete code base can seem like a tedious task.
With the Jovo CMS Integrations, we want to remove that hurdle and help people work on content more collaboratively.
We experienced ourselves that using Google Sheets as a CMS for our own Alexa Skills and Google Actions was the solution that required the least effort, while still being quite powerful and flexible.
Here are some reasons for using Google Sheets for content:
Let's get started with Google Sheets and Jovo.
First, we need to prepare a Google Spreadsheet and add some content. We will just use a
responses sheet that includes a
key and a locale (in our case
en for English).
Take a look at the sample spreadsheet we created:
To use it for yourself, click
File > Make a copy... and save it to your own Google Drive.
You can then edit the content as much as you want. After editing, make sure that you publish it to the web by going to
File > Publish to the web.... Your spreadsheet needs to be accessible to anyone with the link. You can make sure it is by clicking on the blue
SHARE button to the top right. It should look like this:
After it's available for anyone, you can get the spreadsheet ID by copying the relevant part from the URL.
In this section, we will integrate the Google Spreadsheet with a Jovo voice app in three simple steps:
You can find the full documentation here: Jovo Google Sheets CMS Integration.
This integration works with Jovo v2. Learn how to migrate from a v1 project here.
To get started, we need to enable the Google Sheets integration.
app.js file, register it with the
You can simply add the following to your
config.js file in the
The Google Sheets integration allows you to add several different sheets of various sheet types. For this example, we're just going to use the
Responses sheet type.
Now let's take a look at the
app.js file in the
src folder. Because we're using the
Responses sheet type, you can access the content strings with the
If you want to pass additional parameters, you can add them as an object:
That's it! If you now test it, you should be able to get the responses you defined in your Google Spreadsheet.
You can test it locally by using the following command:
There are lots of additional things you can do with this integration, which we are going to focus on in upcoming tutorials.
Any specific questions? Just drop them below. Alternatively, you can also fill out this feedback form. Thank you!