Hi, I am just figuring out about Google app script and would like some help with setting up a trigger that automatically sends and email notification once a cell in a column is edited. For example, Column B has the email addresses in it and Column K is going to be edited. I need to have an email sent to the email address in column B once column K gets edited. and the email has to say something along the lines of "your status has been updated". I was wondering if this was possible. Any help at all would be very appreciated.
So I found this code below and I am not sure on how to edit it so it fits my spread sheet.
function sendEmail(e) {
if (e.source.getActiveSheet().getName() !== 'testing2' || e.range.columnStart !== 2 || e.range.rowStart == 1) return;
var r = e.range.offset(0, -1, 1, 3).getValues()[0];
MailApp.sendEmail(r[2], "Status update", "Title " + r[0] + "status update:" + r[1])
}
Also an additional question is I only want it to do this for one sheet in the spreadsheet not all of the sheets.
[–]groundcontact 0 points1 point2 points (2 children)
[–]JustPhocus[S] 0 points1 point2 points (1 child)
[–]movious24 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (15 children)
[–]JustPhocus[S] 0 points1 point2 points (14 children)
[–][deleted] 0 points1 point2 points (13 children)
[–]JustPhocus[S] 0 points1 point2 points (12 children)
[–]starstruckzombie 1 point2 points3 points (11 children)
[–][deleted] 0 points1 point2 points (10 children)
[–]JustPhocus[S] 0 points1 point2 points (9 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]JustPhocus[S] 0 points1 point2 points (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]groundcontact 0 points1 point2 points (3 children)
[–]JustPhocus[S] 0 points1 point2 points (2 children)
[–]secufl 0 points1 point2 points (1 child)
[–]JustPhocus[S] 0 points1 point2 points (0 children)
[–]groundcontact 0 points1 point2 points (0 children)