How to send a List to Google spreadsheet

I have a list of User answer, then i want to send it to google spreadsheet.

I want to process these user answers manually later.

So I need to access them using a Google spreadsheet.

[ I want to send a list of numbers from kodular app to google spreadsheet](I want to send a list of numbers from kodular app to google spreadsheet - #11 by TimAi2)

I think this is close, but I still haven’t managed to try it.

@Still-learning @taifun, @The_K_Studio please help?

You are correct

Taifun

1 Like

Can you help me @ehshan_khan ehshan_khan

I don’t know much about sheet yet, but lets try this together see maybe you can get help, my first question does your sheet have columns for this data? eg column A for answer of question 1, column B for answer from question 2?

1 Like

Use apps script. Use appendrow would be a better one

1 Like

Thanks everyone, i already solved it!
List_Gsheet.aia (4.0 KB)

function doPost(e) {
try {
var ss = SpreadsheetApp.getActive();
var sh = ss.getSheetByName(‘Sheet1’);
var data = JSON.parse(e.postData.contents);
if (!Array.isArray(data[0])) {
sh.appendRow(data);
} else {
for (var i = 0; i < data.length; i++) {
sh.appendRow(data[i]);
}
}
return ContentService.createTextOutput(“Success”);
} catch (err) {
return ContentService.createTextOutput("Error: " + err);
}
}