Create an Apps Script Web App
In your Sheet, click Extensions → Apps Script. Delete any existing code and paste this script exactly:
function doPost(e) {
var sheet = SpreadsheetApp
.getActiveSpreadsheet()
.getActiveSheet();
var data = JSON.parse(e.postData.contents);
var row = [new Date().toISOString()];
var keys = Object.keys(data.answers);
keys.forEach(function(k) {
var a = data.answers[k];
var val = a.value || (a.values ? a.values.join('; ') : '') || (a.rating ? a.rating+'/5' : '');
var extra = a.followup || a.other || '';
row.push(val, extra);
});
sheet.appendRow(row);
return ContentService
.createTextOutput(JSON.stringify({status:'ok'}))
.setMimeType(ContentService.MimeType.JSON);
}
function doGet() {
return ContentService
.createTextOutput(JSON.stringify({status:'ok'}))
.setMimeType(ContentService.MimeType.JSON);
}
Click Save, then click Deploy → New deployment. Set type to Web app, set "Who has access" to Anyone. Click Deploy and copy the Web App URL.