When you want to sync multiple Google Calendars into one. Currently Google Calendar doesn't have this option and IFTTT/Zapier don't allow an easy way to do this.
This is useful for a collective Busy/Free Calendar or Google Home integration.
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.
Click on "New Project".
Replace everything in Code.gs
with the contents of SyncCalendarsIntoOne.gs.
Create a new script file called BatchRequests.gs
with the contents of BatchRequests.gs
Update calendarsToMerge
, calendarToMergeInto
, SYNC_DAYS_IN_PAST
, and SYNC_DAYS_IN_FUTURE
variables. Be sure to save.
Click the Project Settings
Gear icon on the left panel. Check the Show "appsscript.json" manifest file in editor
. Go back to code editor on the left, and update its content with appsscript.json.
Click Run
. This will load the Authorization required
window since it's your first time running the script. Click on Review permissions
and give it permission to your account.
Click on Triggers
clock icon on the left panel to add a trigger. Click on Add Trigger
.
"From calendar" will run when a given calendar updates. Use this if you want instant merging.
a. Time-driven
SyncCalendarsIntoOne
Head
Time-driven
b. From calendar
SyncCalendarsIntoOne
Head
From calendar
Enjoy!
event favorite, event unknown, and event warning by arjuazka from the Noun Project Merge by Travis Avery from the Noun Project
MIT © Ali Karbassi