Skip to content

feat: migrate events to Google Calendar API#1511

Draft
BekahHW wants to merge 4 commits into
mainfrom
feat/events-migrate-to-google-calendar
Draft

feat: migrate events to Google Calendar API#1511
BekahHW wants to merge 4 commits into
mainfrom
feat/events-migrate-to-google-calendar

Conversation

@BekahHW
Copy link
Copy Markdown
Member

@BekahHW BekahHW commented May 17, 2026

What

Replaces the Craft CMS / Solspace Calendar GraphQL data source for events with the Google Calendar API.

Why

Part of the migration off Craft CMS. Events were the last piece of data being fetched from Craft at build time. This removes that dependency entirely.

How

  • Rewrote src/data/events.ts to fetch events from Google Calendar API using two new env vars:
    • GOOGLE_CALENDAR — API key (already added to Netlify)
    • GOOGLE_CALENDAR_IDS — comma-separated list of calendar IDs (already added to Netlify)
  • Fetches from all 3 VC calendars in parallel (Coffees, Lunch & Learns, Coffee Table Groups)
  • Merges, deduplicates cancelled events, sorts by start time, and slices to the requested limit
  • Maps Google Calendar fields to the same EventItem shape the events page already expects:
    • summarytitle
    • start.dateTimestartDateLocalized
    • end.dateTimeendDateLocalized
    • descriptioneventCalendarDescription (sanitized)
  • Falls back to mock data if env vars are missing (same pattern as before)
  • Preserves all "Add to Calendar" link generation (Google, Outlook, ICS) unchanged
  • Does not expose the location field (where Zoom links live) — keeps member-only join links private
  • Removes all graphql-request, CMS_URL, and CMS_TOKEN usage from this file

After merge

  • Remove CMS_URL and CMS_TOKEN from Netlify env vars (once both this and the podcast PR are merged)
  • Cancel Craft CMS subscription
  • Optionally remove graphql-request from package.json if no other files use it

@BekahHW BekahHW requested a review from a team as a code owner May 17, 2026 20:46
@netlify
Copy link
Copy Markdown

netlify Bot commented May 17, 2026

👷 Deploy Preview for virtual-coffee-io processing.

Name Link
🔨 Latest commit 62fec43
🔍 Latest deploy log https://app.netlify.com/projects/virtual-coffee-io/deploys/6a0c78c67af01c0008e91d66

BekahHW and others added 2 commits May 18, 2026 10:59
Refactor event data structures and add Google Calendar event fetching functionality.
@danieltott danieltott force-pushed the feat/events-migrate-to-google-calendar branch from e2f6380 to 9e3a7ab Compare May 18, 2026 14:59
@JoeKarow
Copy link
Copy Markdown
Member

@BekahHW I'm going to merge PR #1501 and then do the CraftCMS -> Google Calendar changes to the slack event webhooks on this PR, so we keep the CraftCMS-> GCal changes together.

@JoeKarow JoeKarow self-assigned this May 19, 2026
@JoeKarow JoeKarow marked this pull request as draft May 19, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants