Have google sheet with events. Each row is a new event with start/end date, title and email address that I would like to sent the invitation to.
I have found this option however it doesn't seem to send invitations but just creating event
"function createCalendarEvent() {
let communityCalendar = CalendarApp.getCalendarById(""calendar_ID"");
let sheet = SpreadsheetApp.getActiveSheet());
let schedule = sheet.getDataRange().getValues());
schedule.splice(0, 2);
schedule.forEach(function(entry){
communityCalendar.createEvent(entry[2], entry[0], entry[1]);
});
}"
I would like to send invitations to ppl who are about to join each of the meetings. Sample spreadsheet: https://docs.google.com/spreadsheets/d/1kuInNuaRXNnj8SfwD2aT2BuwgU6cqSPAoLSVYFHzd9Y/edit#gid=0
CodePudding user response:
In your script, how about the following modification?
From:
communityCalendar.createEvent(entry[2], entry[0], entry[1]);
To:
communityCalendar.createEvent(
entry[2],
entry[0],
entry[1],
{
guests: entry[3],
sendInvites: true
}
);