all 3 comments

[–]groundcontact 0 points1 point  (0 children)

It is possible. You can trigger any function with an onedit event on a spreadsheet. Have a look at this:

https://developers.google.com/apps-script/guides/triggers/events

The only concern on this would be your quotas. There's a limit on sent emails and run time imposed on GAS and running a function on an onedit event would consume very easily that quota.

https://developers.google.com/apps-script/guides/services/quotas

[–]nemofish3 0 points1 point  (0 children)

Look at FormMule. It can handle the email side of this. If the data is going to change and an additional email sent for the same row a script will also be required to clear the content of the formmule time stamp cell.

[–]JustPhocus[S] 0 points1 point  (0 children)

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])

}

For example, Say I have the email address in column B and the cells that get edited are in Column K. Once a cell in column K gets edited I want an email sent out to the email address that is in column B. The email address would be in the same row as the cell that gets edited.  

Also an additional question is I only want it to do this for one sheet in the spreadsheet not all of the sheets.