I have a list of customer names and email addresses that are being updated by a Google form.
I'm wondering if it's possible if every time a new customer is recorded, they are automatically sent a welcome email, without running the script every time.
I have "Name" in column "a", and "Email address" in column "B"
I have this simple code that I found, but it only sends to the last row when I run the script.
function activeRowEmail() {
var sheet = SpreadsheetApp.getActiveSheet();
var lastRow = sheet.getLastRow() ;
var name = sheet.getRange(lastRow, 1).getValue();
var email = sheet.getRange(lastRow, 2).getValue();
MailApp.sendEmail(email,"new email","hello " + name + ", thank you..... " );
}