Skip to content

Add per-event Google Meet links to the calendar tools - #101

Merged
berges99 merged 1 commit into
mainfrom
feat/google-calendar-meet-links
Jul 26, 2026
Merged

Add per-event Google Meet links to the calendar tools#101
berges99 merged 1 commit into
mainfrom
feat/google-calendar-meet-links

Conversation

@pedrolivaresanchez

Copy link
Copy Markdown
Collaborator

Why

google_calendar_create_event never sent conferenceData, so Google was never asked for a room and would not volunteer one. Since September 2020 the Calendar API only attaches a conference when the caller explicitly requests it — the user- and admin-level "automatically add video calls" settings do not apply to API-created events.

That left callers who need a join link with one option: reuse a standing Meet room across every event. Google warns against exactly this:

Reusing Google Meet conference data across different events can cause access issues and expose meeting details to unintended users. To help ensure meeting privacy, always generate a unique conference for each event by using the createRequest field.

It is also a practical problem: two meetings that overlap collide in the same room.

What

Both google_calendar_create_event and google_calendar_update_event take a new add_google_meet: bool (default False, so existing callers are unaffected).

When set, the request carries a conferenceData.createRequest with a fresh UUID requestId plus the conferenceDataVersion=1 query parameter. Both are required and easy to get wrong independently — Google silently drops the conference if either is missing, and a reused requestId returns the conference it already made rather than a new one, which is how every event ends up sharing a room.

Conferences are created asynchronously, so events.insert can answer pending with no hangoutLink yet. _await_conference re-reads the event up to three times (0.5s, 1s, 2s) until the link lands, and stops immediately on success or failure so a calendar that cannot host Meet does not cost 3.5s.

update_event uses PATCH, so an ordinary reschedule with add_google_meet=False leaves an existing conference untouched.

Tests

python/tests/tools/test_google_calendar.py, 7 cases with httpx mocked: request ids are unique per call, the opt-in parameter and body travel together, the pending path polls and the failure path does not, and a plain update sends no conference data.

7 passed in 0.70s

`google_calendar_create_event` never sent `conferenceData`, so Google was
never asked for a room and would not volunteer one — since September 2020
the API only attaches a conference when the caller explicitly requests it.
Callers that needed a join link had no option but to reuse a standing room
across every event, which Google warns against: shared conference data
leaks meeting access between unrelated attendees.

Both create and update now take `add_google_meet`. When set, the request
carries a `conferenceData.createRequest` with a fresh UUID and the
`conferenceDataVersion=1` query parameter — both are required, and Google
silently drops the conference if either is missing.

Conferences are minted asynchronously, so a response can come back
`pending` with no `hangoutLink`. The event is re-read a few times until the
link lands, since a conference nobody can join is the failure this is meant
to prevent.
@berges99
berges99 self-requested a review July 26, 2026 09:34
@berges99
berges99 merged commit 827a1f5 into main Jul 26, 2026
9 checks passed
@berges99
berges99 deleted the feat/google-calendar-meet-links branch July 26, 2026 09:38
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.

2 participants