0
votes

https://support.google.com/docs/answer/91588?hl=en

I have a Sheet where the the cells are filled in with data that is pulled via Apps Script, which they get from a website. Sometimes they pull in the exact same data, sometimes not. On the old Sheets version I use to be able to get emails when the data only "changes" to a different value. Now with the new Sheets, I get an email when new data is pasted into the cells, even though its the exact same data......and, I can't set it to look at ranges anymore, only the entire document. Is there an easy way to watch cells for when the data changes, and then email myself?

1
Have you tried including an email function in your onEdit()? Please let us know if you've made any attempts on this so far.pointNclick
I haven't. Not real good with it yet, here's my sheet tho: docs.google.com/spreadsheets/d/…Aaron
Read the links I provided in the answer below. They should help you out. They're exactly what you need. Then if you get stuck, create a new question, post your code and we can help you resolve it further.pointNclick

1 Answers

1
votes

This looks a lot like what you're trying to do.

For checking whether the value has truly changed after the edit, this gives you all the necessary information about it. Hence, you would know whether the new value is the same one or not. Implementing the "workaround" talked about in the second link, I was able to compare and send an email to myself if the value changed. Initiate an onEdit trigger that goes off for your onEdit function which uses these lines after all the checks in place have passed.

var email = "[email protected]";
MailApp.sendEmail(email, "TriggerMail", "A change has occurred in the Sheet");

NOTE: This only sends you a "notification" sort of an email but you can even include the changed values in the email easily by just following this tutorial.