I have a project where I am trying to send data directly into google spreadsheets through google script. I have a get function in google script:
function doGet(e) {
var obj = e.parameter;
var data = [];
var key = "spreadsheetKey";
var sheetName = "Names";
for(var name in obj) {
data.push(obj[name]);
}
var sheet = SpreadsheetApp.openById(key).getSheetByName(sheetName);
sheet.appendRow(data);
var result = {result:data}; //could be any value that you want to return
return ContentService.createTextOutput(JSON.stringify(result)).setMimeType(ContentService.MimeType.JSON);
}
As of now this script will return the same data it was sent in JSON format. The problem I have at this moment is that google redirects the get call to another page. See bottom of this page. How do I get espruino to redirect?? Thank you in advance for your help on the subject.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I have a project where I am trying to send data directly into google spreadsheets through google script. I have a get function in google script:
As of now this script will return the same data it was sent in JSON format. The problem I have at this moment is that google redirects the get call to another page. See bottom of this page. How do I get espruino to redirect?? Thank you in advance for your help on the subject.