GESD - bonus
GESD - bonus
function sendEmailNotification(e) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var row = e.range.getRow();
var email = "your-email@example.com"; // Nahraďte vaším e-mailem
var subject = "Nová odpověď na Google Formulář";
var message = "Nová odpověď byla odeslána.\n\n";
var dataRange = sheet.getRange(row, 1, 1, sheet.getLastColumn());
var data = dataRange.getValues();
for (var i = 0; i < data[0].length; i++) {
message += sheet.getRange(1, i+1).getValue() + ": " + data[0][i] + "\n";
}
MailApp.sendEmail(email, subject, message);
}
function onFormSubmit(e) {
sendEmailNotification(e);
}