title: Calendar | event change - how to notify changes to non-Google accounts
body: <p>I have a script running in a Google Spreadsheet that successfully can create new events; including inviting people with a non-Google account.</p>
  
  <p>Another script can update an existing event. It nicely can reschedule the event, change location, adds/removes attendees. </p>
  
  <p>However, attendees not having a Google account, don't get a notification/update.</p>
  
  <p>When I manually change an event in Google Calendar, I'm asked if I want to notify people. If I press OK, all attendees, are informed, including non-Google accounts.</p>
  
  <p>How to trigger this by script?</p>
  
  <p>The script below runs correctly. </p>
  
  <pre><code> function sendInvite(calendarId, eventId, email) {
    var n = eventId.indexOf("@")
    var str = eventId.substring(0,n)
    var event = Calendar.Events.get(calendarId, str);
    if(event.attendees) {
      event.attendees.push({
        email: email
      });
    } else {
      event.attendees = new Array({email: email});
    }
    if(email[0].length &gt; 0) {
      event = Calendar.Events.patch(event, calendarId, str, {
        sendNotifications: true
      });
    }
  }
  </code></pre>