Sync multiple Google Calendars into one, seamlessly
- This is a simple Google AppsScript script which is used for syncing multiple Google Calendars into one.
- Imagine you had multiple Google Calendars, and you wanted to give your manager or your co-worker access to a merged version of a busy/free calendar to schedule meetings. This AppsScript provides you with an easy way to do so.
- IFTTT and Zapier do not provide an easy way to do this, and AppsScript is a free and working alternative to the already existing paid services.
- All you need to do is follow the instructions below.
- Make sure every Google Calendar you want synced is shared with the Google account that holds the shared calendar
- Log into the account that holds the shared calendar and go to the Google AppsScript
- Create a new project
- Replace everything in
Code.gs
with the contents ofSyncCalendars.js
(the file extension is not important here) - Go to
View -> Show Manifest
and update its content withappsScript.json
after saving the project (name doesn't matter here) - Update
calendarsToMerge
,calendarToMergeInto
, anddaysToSync
in theCode.gs
file there, instructions are documented in the code itself - Click on the
trigger-clock icon
to add a trigger (5th icon from the left below File/Edit/View/Run) - Click on
Add Trigger
and set it up with the following values and you should be good to go!
- Choose which function to run -
syncCalendars
- Choose which deployment should run -
Head
- Select event source -
Time-driven
- Select type of time based trigger -
Hour timer
- Select hour interval -
Every hour
- Failure notification settings -
Notify me daily
You can test this out by running the script with the run button (play icon in the code view) and check if you have recieved any new events in your shared calendar. It'll run automatically every hour.
- Google AppsScript has a daily limit of 5k calendar events created every day.
- Make sure you turn off notifications in AppsScript and the shared calendar, or you'd be bombarded with event creation mails!
If you are facing a problem, feel free to contact me or create an issue over here, pull requests are welcome as well!