Browser extensions that scrape your Microsoft Teams Shifts schedule and export it to a calendar (ICS / Outlook / iCloud / Nextcloud).
- Click the link above to download the
.xpifile - In Firefox, go to
about:addons→ gear icon → Install Add-on From File… - Select the downloaded
.xpi
Load unpacked from the teams-shifts-exporter-chrome folder:
- Go to
chrome://extensionsand enable Developer mode - Click Load unpacked and select the
teams-shifts-exporter-chromefolder from this repo
- Scrapes your Teams Shifts schedule (including open shifts)
- Exports to ICS file, Outlook Calendar, iCloud Calendar, or Nextcloud (CalDAV)
- Auto-syncs on a daily schedule
- Skips open shifts that overlap or are within 8 hours of your assigned shifts
- Supports midnight-crossing shifts
- Open Microsoft Teams Shifts in your browser
- Click the extension icon and hit Sync Shifts
- Optionally enable Outlook Calendar, iCloud Calendar or Nextcloud / CalDAV sync in the popup
- In Nextcloud, go to Personal settings → Security → Devices & sessions and create an app password.
- In the extension popup, enable Nextcloud / CalDAV and enter your server URL (e.g.
https://cloud.example.com), username, app password and calendar name (defaultWork Shifts). - Click Save & Grant Access and accept the browser prompt to allow the extension to reach that server (the URL is user-entered, so the permission is requested at save time).
The calendar is created if it does not exist. Nextcloud sync tracks its own state, separate from iCloud, so both can be enabled at once.
If your server sits behind Cloudflare Access / SSO, the CalDAV path must be reachable from the browser or container, for example via a LAN URL or a bypass policy for /remote.php/dav.
Docker: set NEXTCLOUD_URL, NEXTCLOUD_USER, NEXTCLOUD_APP_PASSWORD (and optionally NEXTCLOUD_CALENDAR_NAME) in the container environment, or fill in the Nextcloud section of the dashboard. Dashboard values take precedence over environment variables.
Open Shift location in the popup and enter your work address, and optionally its coordinates (latitude, longitude). Every timed shift then carries the address as its location. With coordinates, each shift also gets GEO and Apple's structured location, so Calendar shows a map pin and travel time without looking the address up. Time off and availability sign-ups get no location. Leave both fields empty to turn it off.
Docker: fill in the two Shift location fields on the dashboard, or set WORK_LOCATION and WORK_GEO in the container environment. Dashboard values take precedence.
- "Last export" always updates after a good export. It is recorded as soon as the shifts are read, so a slow or failing calendar destination can no longer leave it on an old date.
- Nextcloud errors say what failed. Instead of a bare "Failed to fetch", the popup names the CalDAV step (discover, list, create, upload, delete) and the reason: no answer, a missing site permission, a redirect, or the server's status. URLs, paths and credentials are never shown.
- Test connection for Nextcloud in the popup checks the saved settings with one read-only request.
- Shifts can carry your work location. A new optional Shift location setting (popup and Docker dashboard, or
WORK_LOCATION/WORK_GEOfor Docker) adds your work address to every timed shift asLOCATION. With coordinates, it also addsGEOandX-APPLE-STRUCTURED-LOCATION, so calendar apps and other planners know where each shift is. Scheduled shifts already on iCloud or Nextcloud get the location on the next sync. Clear the fields to remove it again. Nothing is looked up online.
- Shifts synced to Nextcloud or iCloud no longer get an alert. Each event now carries an explicit "no alert" (
ACTION:NONE, the form Apple Calendar writes itself). Without it, iPhone and Mac Calendar gave every shift the Default Alert Time from Settings. Scheduled shifts get the change on the next sync. Open shifts already on the calendar with no alarm are rewritten once. An open shift with an alert you set yourself is left alone, and one you deleted stays deleted.
- Calendar errors now say why the server refused an event. When iCloud or Nextcloud rejects a shift, the error ends with the server's own reason (for example Nextcloud's "Validation error in iCalendar: …") instead of only the HTTP code.
- Fixed Nextcloud refusing every shift (HTTP 415). Each event sent over CalDAV included
METHOD:PUBLISH, which CalDAV servers built on Sabre (Nextcloud) reject: "A calendar object on a CalDAV server MUST NOT have a METHOD property." It's removed from events sent to iCloud and Nextcloud. The downloadable .ics file keeps it. - Fixed every sync stopping with "Sync already in progress" after a Clear & Re-import. The iCloud and Nextcloud clear steps never turned off the running flag, so later syncs, automatic ones too, refused to start and the popup kept showing the last step. The flag is now cleared whether the step works or fails.
- Fixed the next sync stopping with "Sync cancelled" after Cancel was pressed while nothing was running. Each sync now starts with that flag cleared.
- Clear & Re-import now saves its errors, so the popup shows "Last sync failed: …" when you open it again, the same as a normal sync.
- Fixed Nextcloud sync failing on every run after a calendar was copied or imported. Events are now matched by the UID inside them, not by filename. A copied calendar keeps the extension's UIDs under new filenames, and Nextcloud refused each write to
<uid>.icsas a duplicate UID (HTTP 400). Existing events are now updated where they are, and stale future ones are removed. The same applies to iCloud. - Calendar sync failures are no longer reported as success. If iCloud or Nextcloud fails, the popup shows "Last sync failed: …", and automatic runs send a notification. Before this, only a manual export showed the error.
- Added Nextcloud / CalDAV sync target alongside iCloud (Chrome, Firefox and Docker). Uses an app password, discovers the calendar home via
/remote.php/dav/, and keeps its own open-shift tracking so it never interferes with iCloud state. - The CalDAV code is now a generic client; iCloud is a thin wrapper around it with unchanged behavior.
- Server URL access is requested as an optional host permission when you save the Nextcloud settings.
- Fixed shift times exported in the wrong timezone — ICS events are now
written as UTC instants (
Ztimes) instead of floating local time, so exports are correct regardless of the device's or Docker container's timezone (e.g. while traveling). All-day events use the UTC calendar date. - Docker image now builds from the Chrome extension directory directly —
removed the stale duplicated
extension/copy (it was missing the v1.6x sign-up-slot and Outlook calendar fixes).
- Availability sign-up slots now appear as all-day events titled
Avl HHMM(e.g.Avl 1430) matching the compact shift-code style
- Fixed sign-up detection — now queries
shiftrequestsper team (the correct Teams endpoint) and matchesrequestType: "Open"entries by theirshiftIdfield against open shift IDs, correctly detecting which availability slots the user has signed up for
- Fixed sign-up detection — pagination now runs first so tenantId can be extracted directly from open shift objects, then sign-up requests are fetched with the correct ID
- Fixed tenant ID detection — now reads from Teams API response and intercepted request URLs, with JWT decode as fallback (fixes sign-up requests not being fetched)
- Fixed sign-up requests not being detected — tenant ID is now read directly from captured request URLs instead of relying on JWT decoding
- Renamed toggle to "Sync sign-ups to Open Time Signup calendar" to make it clear sign-ups go to a separate calendar
- Availability sign-up slots now sync to a separate "Open Time Signup" iCloud calendar instead of "Work Shifts"
- Added "Sync sign-ups to Open Time Signup calendar" toggle (default off) — syncs availability slots you've signed up for to a separate iCloud calendar
- Changed "Include open shifts" toggle to default off (was previously on by default)
- Availability sign-up slots you've signed up for now appear on your calendar with a "Signed Up: [shift]" prefix — previously all bare time-code open shifts were filtered out regardless of sign-up status
- Fixed future shifts missing from ICS/iCloud — API responses are paginated via
nextLink; previous code only read the first page (which was full of availability sign-up shifts), so scheduled shifts on page 2+ were silently dropped
- Exclude availability sign-up open shifts (titles that are bare time codes like "1430 DX" or "0015 DX/DXC") — real posted open shifts with position prefixes like "P2 1245" are still included
- Added open shift debug data panel in popup (▸ Open shift debug data) to inspect raw API fields after sync — needed to identify how new availability sign-up shifts differ from regular open shifts
- Fixed "Download ICS" button throwing
TypeError: Cannot read properties of undefined (reading 'download')—chrome.downloadsis not available in offscreen documents; switched to anchor-click on blob URL
- Fixed Firefox cancel sync button causing popup to close
- Fixed Outlook calendar auto-focus unfocusing the Work Shifts calendar itself
- Fixed Chrome/Docker iCloud upload rate limiting (added missing delays)
- Improved error logging in background scripts for better debugging
- Error messages no longer persist across browser restarts (stale errors auto-clear)
- Fixed potential crash when stored history data is corrupted (now validates and resets gracefully)
- Improved "No teams found" error to suggest checking if schedule is set up in Teams
- General stability improvements
- Added TDO (Time off) support: TDO blocks are now exported as all-day calendar events with any notes included in the description
- Fixed shift notes containing newlines (e.g. traded shifts with multi-line trade notes) being silently dropped due to regex not matching across line breaks — notes now appear in the event description
- Regex hardened to handle overnight shifts where Teams includes a weekday prefix before the end date, and non-standard theme names
- Fixed sync failure when Shifts is not pinned to the left sidebar: flyout now waits up to 2s for the menu to render, uses broader item matching, and reports a clear error instead of silently timing out
- Navigation errors (sidebar not found, Shifts not in menu) now surface immediately with a descriptive message
- Added 90-second watchdog: if no progress is made for 90 seconds the sync is automatically cancelled and an error is reported, preventing silent hangs
- Fixed sync failure after "Almost there!" Continue click: wait for Teams sidebar to become interactive before re-navigating to Shifts (prevents clicking into an unresponsive page after the post-auth reload)
- Increased per-week stability threshold from 1.2s to 2s so shifts finish rendering before moving to the next week
- Chrome: port iCloud putEvent retry logic (was Firefox-only)
- Replace fixed 500ms per-week pause with a smart wait (up to 1500ms) that exits as soon as shift cards appear
- Increased week-load timeouts: shifts-stable wait raised to 10s max, week-change wait to 8s (both still exit early as soon as content is ready)
- Fixed iCloud upload hanging mid-way by making the background page persistent (Firefox was suspending it during long syncs, pausing all fetches and timeouts)
- Close the Teams scrape window immediately after scraping, before iCloud/Outlook sync runs
- Increased iCloud upload delay to 500ms to further reduce rate-limit stalls
- Fixed wrong "more apps" button being clicked (was selecting chat's "..." instead of the left sidebar one), causing "Timed out waiting for Shifts iframe"
- Firefox: add 250ms delay between iCloud uploads to prevent rate-limit stalls mid-upload
- Firefox: retry iCloud uploads up to 3 times on stall/timeout to fix hang mid-upload
- Firefox: increased popup width by 5% to reduce scrollbars
- Close the Teams tab opened for scraping after sync completes
- Chrome: reduced post-Continue pause to 2500ms
- Fixed sync getting stuck after clicking Continue on the "Almost there!" dialog (added delay to let Teams finish its post-auth reload before re-navigating)
- Auto-dismiss Teams "Almost there!" permissions dialog when opening Shifts
- Fixed sync failure when Teams reloads the page after accepting the permissions dialog
- Fixed long status messages causing horizontal scrollbar in popup
- Firefox: fixed double-scrape when sync was triggered concurrently
- Firefox: fixed ICS download blocked by browser security (switched to blob URL)
- Chrome: fixed Outlook import window minimizing macOS windows (now opens as background tab)
- iCloud app password now persists between extension updates
- Chrome: fixed ICS download (was blocked by MV3 service worker restrictions)
- Chrome: fixed "stuck on Opening Teams" when Teams was already open
- Firefox: fixed week X of XX progress during scraping
- Firefox: sync now runs in a background window
- Show last sync error in popup if previous sync failed
- Update banner in popup when a newer version is available
- Open shift 8-hour gap filter is now always applied (no longer optional)
- Added calendar icon
- Firefox: fixed stale sync state on browser restart
- Added cancel sync button
- Fixed progress bar during iCloud upload phase
- Fixed "removing old shifts" step getting stuck
- Fixed sync button stuck disabled after Chrome restart mid-sync
- Added progress bar with step labels
- Fixed midnight-crossing open shifts (e.g. "Apr 28, 12:30 AM" end times)
- Fixed UID collision between open shifts and scheduled shifts with same start time
- Added iCloud open shift tracking to prevent re-upload issues