Skip to content

feat(calendar): add Google Meet and attachment support for events#248

Open
tuannvm wants to merge 2 commits intogemini-cli-extensions:mainfrom
tuannvm:feat/calendar-meet-attachments
Open

feat(calendar): add Google Meet and attachment support for events#248
tuannvm wants to merge 2 commits intogemini-cli-extensions:mainfrom
tuannvm:feat/calendar-meet-attachments

Conversation

@tuannvm
Copy link

@tuannvm tuannvm commented Mar 2, 2026

Summary

Fixes #247calendar.createEvent and calendar.updateEvent now support addGoogleMeet and attachments parameters. No new OAuth scopes required.

Use Case

Schedule a meeting with a Meet link and attach the agenda doc in one call:

  1. calendar.createEvent with addGoogleMeet: true and attachments: [{fileUrl: "https://drive.google.com/open?id=..."}]

Or add a Meet link to an existing event:

  1. calendar.updateEvent with eventId and addGoogleMeet: true

Changes

  • CalendarService.ts: Added EventAttachment interface, addGoogleMeet/attachments fields to CreateEventInput and UpdateEventInput, and a private applyMeetAndAttachments helper shared between create and update
  • index.ts: Extracted shared eventMeetAndAttachmentsSchema Zod schema (following the emailComposeSchema pattern) and spread into both tool registrations
  • CalendarService.test.ts: Added tests for Meet creation, negative cases, attachments, combined Meet+attachments, and equivalent scenarios for updateEvent

Testing

Tested locally and successfully created a calendar, along with the Google Meet link and attached doc.

Signed-off-by: Tommy Nguyen <tuannvm@hotmail.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the calendar event management capabilities by integrating Google Meet and file attachment support directly into the event creation and update processes. These additions provide users with more robust tools for organizing meetings and sharing relevant documents, all while maintaining existing security protocols and requiring no new authentication. The changes streamline event setup and improve the overall utility of the calendar service.

Highlights

  • Google Meet Integration: Added addGoogleMeet parameter to calendar.createEvent and calendar.updateEvent tools, allowing users to automatically include a Google Meet link when creating or modifying events.
  • Attachment Support: Introduced an attachments parameter to calendar.createEvent and calendar.updateEvent, enabling the addition of Google Drive file attachments to calendar events.
  • No New OAuth Scopes: Confirmed that these new functionalities do not require any additional OAuth scopes, simplifying integration and security.
  • Shared Logic and Schema: Implemented a private helper function applyMeetAndAttachments to centralize the logic for handling conference data and attachments, and extracted a shared Zod schema eventMeetAndAttachmentsSchema for consistent validation.
  • Comprehensive Testing: Added 8 new tests covering various scenarios for Google Meet creation, attachment handling, negative cases, and combined functionalities for both event creation and updates.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • workspace-server/src/tests/services/CalendarService.test.ts
    • Added new test suites for createEvent and updateEvent to verify Google Meet integration.
    • Included tests for creating and updating events with file attachments.
    • Implemented tests for scenarios where Google Meet is explicitly not added and for combined Meet and attachment usage.
  • workspace-server/src/index.ts
    • Defined a new shared Zod schema, eventMeetAndAttachmentsSchema, for validating Google Meet and attachment parameters.
    • Integrated the eventMeetAndAttachmentsSchema into the input definitions for calendar.createEvent and calendar.updateEvent tool registrations.
  • workspace-server/src/services/CalendarService.ts
    • Introduced the EventAttachment interface to define the structure for event attachments.
    • Updated CreateEventInput and UpdateEventInput interfaces to include addGoogleMeet and attachments properties.
    • Implemented a private helper method applyMeetAndAttachments to encapsulate the logic for adding conference data and attachments to event bodies and API parameters.
    • Modified createEvent and updateEvent methods to utilize the new addGoogleMeet and attachments inputs and the applyMeetAndAttachments helper.
Activity
  • The author tuannvm has introduced new features to support Google Meet and attachments for calendar events.
  • The author has added a new interface EventAttachment and updated existing input interfaces for calendar events.
  • A private helper method applyMeetAndAttachments was created to centralize logic for handling conference data and attachments.
  • A shared Zod schema eventMeetAndAttachmentsSchema was defined and applied to createEvent and updateEvent tools.
  • Extensive unit tests have been added to validate the new Google Meet and attachment functionalities for both event creation and updates.
  • The pull request description indicates that all 407 tests pass across 25 suites and npm run lint is clean.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for creating Google Meet links and adding attachments to calendar events. The changes are well-structured, introducing a shared Zod schema for the new parameters and a helper function to avoid code duplication in the CalendarService. The new functionality is also thoroughly covered by new tests. I have a couple of suggestions to improve code robustness and test maintainability.

if (addGoogleMeet) {
event.conferenceData = {
createRequest: {
requestId: `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For generating a requestId, it's better practice to use a more robust method for generating unique IDs than Math.random(). I'd suggest using crypto.randomUUID() to ensure uniqueness and avoid potential collisions, however unlikely.\n\nYou'll need to add import { randomUUID } from 'crypto'; at the top of the file.

Suggested change
requestId: `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`,
requestId: randomUUID(),

});
});

describe('createEvent with Google Meet', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's some duplication in the test setup. The beforeEach block that mocks calendarList.list is repeated in the describe blocks for 'createEvent with attachments', 'updateEvent with Google Meet', and 'updateEvent with attachments'.\n\nTo improve maintainability and reduce code duplication, you could nest these describe blocks within a parent describe and define the beforeEach hook once there. For example:\n\ntypescript\ndescribe('create/update events with Google Meet and attachments', () => {\n beforeEach(async () => {\n mockCalendarAPI.calendarList.list.mockResolvedValue({\n data: {\n items: [{ id: 'primary', primary: true }],\n },\n });\n });\n\n describe('createEvent with Google Meet', () => {\n // ... tests\n });\n\n describe('createEvent with attachments', () => {\n // ... tests\n });\n\n // ... and so on for updateEvent\n});\n

Signed-off-by: Tommy Nguyen <tuannvm@hotmail.com>
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.

feature request: add Google Meet and attachment support to calendar events

1 participant