Google Script - Trigger when a new value that meets a criteria is inserted to a specific sheet & column in Google Sheets
Google Apps Script and Spreadsheet gurus,
I need your help please. I have this spreadsheet:
Background: This spreadsheet is being used to collect batch performance records. This sheet will be updated by a manager who will enter each new production batch into the next available row. If a new production batch is entered and has a variance greater than 10%, I will to get an email alert that a new batch has failed variance standards.
Main Problem: I would like to trigger an email that will be sent when a new value, that meets the criteria "greater than 10%", appears in Range(K3:K52).
In the past I have only been able to manually add triggers to my spreadsheets. I have tried but have not been able to figure out how to program triggers with code. Which I suspect is the way I will have to trigger my script. I also don't know how to get the script to recognize if values were previously there or if a value is a new entry.
So far when I manually run my code, it sends me an alert email with the last batch who's variance is greater than 10%, rather than getting triggered when a new batch entry has a variance greater than 10%.
I really appreciate any help I have been working on the script for a few days and this is the closest I could get.