When you want to sync multiple Google Calendars into one. Currently Google Calendar doesn't have this option and IFTT/Zapier don't allow an easy way to do this.
This is useful for a collective Busy/Free Calendar or Google Home integration.
It uses:
- Library: https://github.com/tanaikech/BatchRequest
- Integration: Calendar v3
If you edit appsscript.json
to the uploaded one, they can be used, no further action is necessary.
- Make sure every calendar you want sync is shared with the account that holds the shared calendar.
- Log into the account that holds the shared calendar and go to the Google Apps Scripts website.
- Replace everything in
Code.gs
with the contents of SyncCalendarsIntoOne.gs. - Go to
View
->Show Manifest
and update its content with appsscript.json. - Update
calendarsToMerge
,calendarToMergeInto
, anddaysToSync
. - Click on the clock icon to add a trigger.
- Add a
Time-driven
event with it runningevery hour
. - Click on notifications and delete any notifications if you don't want to get notification failure emails.
- Google App Scripts has a daily quote of 5k events created per day. See Quotas for Google Services
- Be sure to turn off "notifications".
- You don't need to use your personal default calendar for this.
In google calendar you can create a new calendar, and you can get its ID at the details section.
It will probably be something like:
xxxxxxxxxxxxxxxxxxxxxx@group.calendar.google.com
.
MIT © Ali Karbassi