Learn how to use Google Spreadsheets as a content management system (CMS) for your Alexa Skills and Google Actions with the Jovo CMS integration.
- Preparing the Google Spreadsheet
- Using the Jovo Google Sheets CMS Integration
- Next Steps
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:
- It's a familiar interface (spreadsheets, Excel)
- Google Sheets has all the collaboration and permission features already built in
- You can create several sheets (displayed as tabs) in one spreadsheet, allowing you to manage several content types (we offer different Sheet Types for this)
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....
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.
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.
- You can use private spreadsheets (find the docs here)
- You can use additional Sheet Types (find the docs here)
- You can define your own Sheet Types (find the docs here)