I am trying to create a calendar that auto adds the note 'Ride not yet scheduled' when I add text to a cell in google sheets. I keep getting either the error "cannot read 'setNote' of undefined" or "Cannot set property 'setNote' of undefined". This is the first time I've tried anything like this and I'm not sure where I'm going wrong/if that's actually possible.
What I have so far is:
function onEdit(e) {
// Set a comment on the edited cell to indicate a ride has not been scheduled
var range = e;
range.setNote = ('Ride not yet scheduled ');
}
// [END apps_script_triggers_onedit]