I got interested in customizing the Amazon Alexa reading Google Sheet. I tried to create codes to enable some of the Alexa functions such as read, edit and list but I was not able to complete and run the output properly.
I have the code in separate working chunks. I tried to use the Alexa Node JS and Google Node JS. Do you think it is possible to combine them together and get it working? I would like to ask for help since I am stuck for in this for months already.
For the Alexa:
'use strict';
var Alexa = require("alexa-sdk");
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
var handlers = {
'ReadFileIntent': function () {
console.log ('In Read File Request')
this.emit(':tell', 'Read');
},
'LaunchRequest': function () {
console.log ('In Launch Request')
this.emit(':tell', 'SayHello');
}
};
For the Google, I followed the below link for a step by step guide https://developers.google.com/sheets/api/quickstart/nodejs
There are two options how you can access content from a Google Spreadsheet:
public spreadsheet: If you set your sheet to public, you can access the content through a JSON endpoint by just using the spreadsheet ID and the position of the sheet you're trying to access: https://spreadsheets.google.com/feeds/list/${spreadsheetId}/${sheetPosition}/public/values?alt=jsonprivate spreadsheet: This is a little more complicated, as you need to do authentication and use the Google Sheets APIThe Jovo Framework for Alexa Skills and Google Actions offers a Google Spreadsheets CMS integration that does all the unnecessary work for you. It offers different sheet types so you can access content in the way you prefer and don't need to do the parsing yourself. You can find a step-by-step tutorial and video here: Tutorial: Use Google Sheets as CMS for your Voice App.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With