My goal is to create a script which users can run from within a shared Sheets file. This script is meant to create a calendar for each user and share it back to me, so I can later push events using this new calendar ID. If possible, I'd like to also setup the all-day-notifications during this script run. Here's my current code:
function create_calendar_share_back_to_me {
var calendar = CalendarApp.createCalendar('test1', {
summary: 'A calendar to store all CRM automated events',
});
Logger.log('Created the calendar "%s", with the ID "%s".',
calendar.getName(), calendar.getId());
}
As you can see. I'm stuck on the sharing part :) I'll of course run this on my machine first in order to provide permissions. Will that be enough to allow all other users in the domain to run this script and create this calendar under their own user (not my user)? Thanks