Spaces:
Running
Running
| # Setup | |
| ## 1. Create a target Google Calendar | |
| In Google Calendar, create a separate calendar named: | |
| ```text | |
| Work Busy | |
| ``` | |
| Open its settings and copy the calendar ID. For a secondary calendar, it usually looks like an email-like ID ending in: | |
| ```text | |
| @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: | |
| 1. Open Calendar. | |
| 2. Go to Settings. | |
| 3. Find shared calendars / publish calendar. | |
| 4. Publish your work calendar with availability only if your tenant allows it. | |
| 5. Copy the private `.ics` link. | |
| 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 | |
| 1. Open <https://script.google.com/>. | |
| 2. Create a new project. | |
| 3. Paste the contents of `outlook-ics-to-google-busy.gs`. | |
| 4. Set project timezone to `Europe/Kyiv`. | |
| ## 4. Set script properties | |
| In Apps Script: | |
| `Project Settings` -> `Script Properties` -> add: | |
| ```text | |
| 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: | |
| ```text | |
| BUSY_TITLE = Busy - Work | |
| ``` | |
| ## 5. Run once | |
| Run: | |
| ```text | |
| syncOutlookBusyToGoogle | |
| ``` | |
| Approve Google Calendar and URL fetch permissions. | |
| ## 6. Add an automatic trigger | |
| In Apps Script: | |
| `Triggers` -> `Add Trigger` | |
| Use: | |
| ```text | |
| 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. | |