G

Overall, how satisfied were you with your service today?

EXCELLENCE ACHIEVED!

We're thrilled you had a 5-star experience!

Internal use only.

ALMOST PERFECT!

Was there one small detail we could have improved today?

Internal use only.

LET'S MAKE IT RIGHT

This goes directly to HEXAGON management so we can resolve this.

THANK YOU

We appreciate your business!

function doPost(e) {
try {
var data = JSON.parse(e.postData.contents);
var sheetName = data.tab || “Review”; // Targets the “Review” tab
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(sheetName);

// Create the tab if it doesn’t exist
if (!sheet) {
sheet = ss.insertSheet(sheetName);
sheet.appendRow([“Date-Time”, “Stars”, “Review”]); // Set headers
}

// Append the specific data requested
sheet.appendRow([
data.timestamp,
data.stars,
data.review
]);

return ContentService.createTextOutput(“Success”).setMimeType(ContentService.MimeType.TEXT);
} catch (error) {
return ContentService.createTextOutput(“Error: ” + error).setMimeType(ContentService.MimeType.TEXT);
}
}