[repost from an erroneous earlier version]
My spreadsheet seems to be registering a change despite the fact that I'm not opening it at all. onOpen is triggered when the sheet is opened; onChange is triggered when the sheet is changed (such as receiving a form submission):
function onOpen(e) {
var range = ss.getRange("A" + lastRow + ":A" + lastRow);
ss.setActiveRange(range); //automatically scroll to last row
MailApp.sendEmail("[email address]", "OPENED", "");
}
function onChange(){
MailApp.sendEmail("[email address]", "CHANGED", "");
[more stuff happens here]
}
I am getting CHANGED emails at random times, including 5 AM and such. The sheet is populated by a form (actually a JotForm which integrates with the sheet). So when someone submits a form I get the CHANGED email without the OPENED email. When I open the sheet of course I get an OPENED email and an CHANGED email. But how could the sheet be changed without being opened, and without a new submission coming in either? What could be going on?