Spaces:
Running
Setup
1. Create a target Google Calendar
In Google Calendar, create a separate calendar named:
Work Busy
Open its settings and copy the calendar ID. For a secondary calendar, it usually looks like an email-like ID ending in:
@group.calendar.google.com
You can use primary, but a separate calendar is cleaner.
2. Get the Outlook private iCal link
In Outlook on the web:
- Open Calendar.
- Go to Settings.
- Find shared calendars / publish calendar.
- Publish your work calendar with availability only if your tenant allows it.
- Copy the private
.icslink.
If the company blocks calendar publishing, stop here and ask IT for an approved free/busy sharing method. Do not bypass company controls.
3. Create the Apps Script
- Open https://script.google.com/.
- Create a new project.
- Paste the contents of
outlook-ics-to-google-busy.gs. - Set project timezone to
Europe/Kyiv.
4. Set script properties
In Apps Script:
Project Settings -> Script Properties -> add:
OUTLOOK_ICS_URL = your private Outlook .ics URL
TARGET_CALENDAR_ID = your Google calendar ID, or primary
SYNC_DAYS = 45
SOURCE_TIMEZONE = Europe/Kyiv
Optional:
BUSY_TITLE = Busy - Work
5. Run once
Run:
syncOutlookBusyToGoogle
Approve Google Calendar and URL fetch permissions.
6. Add an automatic trigger
In Apps Script:
Triggers -> Add Trigger
Use:
Function: syncOutlookBusyToGoogle
Event source: Time-driven
Type: Hour timer
Interval: Every 1 hour
7. iPhone and Mac
On iPhone:
Settings -> Apps -> Calendar -> Calendar Accounts
Enable calendars for:
- Microsoft 365 / Exchange
- iCloud, if used
On Mac:
System Settings -> Internet Accounts
Enable Calendars for the same accounts.
Behavior
Each run deletes previously synced Busy - Work blocks inside the sync window and recreates them from the Outlook .ics feed.
The script does not copy:
- event titles
- descriptions
- locations
- attendees
- Teams links
- ConnectWise or customer/ticket details
Known Limitations
If your Outlook .ics feed contains unexpanded recurring events instead of individual occurrences, this script only syncs non-recurring instances. Most published calendar feeds expose occurrences for the published window, but tenants can differ.