I'm having an issue automating the adding of members to Google Calendars.
My function is:
function addToCalendar(email, calendar) {
// Create a user with read/write access to calendar
var resource = {
scope: {
type: 'user',
value: email
},
role: 'writer'
};
Calendar.Acl.insert(resource, calendar);
}
This function works with Gmail accounts, but does not work correctly with non-Gmail accounts. Non-Gmail accounts are still listed as added within the calendar, but cannot access the calendar.
I think the issue stems from Google Calendar requiring a Gmail account. When you manually try to add a user, you get this prompt:
Screenshot:
Is there any way to replicate this invite with Google Apps Script, or a way to get around this issue?
Any help is appreciated.
Thanks