I am trying to add a guest to a Calendar event by Google Apps Script and to send an invitation as soon as my script add a guest. But I can't find a method to send an email invitation to the guest.
var events = calendar.getEvents(start_date, end_date)
event.addGuest('[email protected]');
Is there any way to send an invitation to the guest from Apps Script?
I rewrote with Advanced Google Services but still the guest I have added can't get invitation email.
var body = {
'sendNotification': true,
'attendees': attendees
};
var ret = Calendar.Events.patch(body, calendarId, eventId);
You can with Calendar in Advanced Google Services, for example:
var event = Calendar.Events.get(calendarId, eventId);
Calendar.Events.patch(event, calendarId, eventId, {sendNotifications: true});
Sets the sending of notifications to true
See the documentation on Calendar in the Advanced Google Services.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With