Skip to content

feat(google-chat): add Google Chat integration with OAuth#3339

Open
waleedlatif1 wants to merge 4 commits intostagingfrom
waleedlatif1/add-google-chat
Open

feat(google-chat): add Google Chat integration with OAuth#3339
waleedlatif1 wants to merge 4 commits intostagingfrom
waleedlatif1/add-google-chat

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Add Google Chat integration with OAuth (send message, list spaces)
  • Register google-chat OAuth provider under Google with chat.spaces.readonly and chat.messages.create scopes
  • Add scope descriptions to oauth-required-modal
  • Add GoogleChatIcon, block config, tool registry entries, and generated docs

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Feb 25, 2026 9:54pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 25, 2026

Greptile Summary

Adds Google Chat integration with OAuth authentication, enabling users to send messages to spaces and list available spaces.

Key Changes

  • Created google_chat tool implementations for sending messages and listing spaces with proper OAuth authentication
  • Registered google-chat OAuth provider under Google with chat.spaces.readonly and chat.messages.create scopes
  • Added Google Chat block configuration with operation dropdown for Send Message and List Spaces
  • Included GoogleChatIcon SVG component in both app and docs
  • Generated comprehensive documentation for the integration

Implementation Quality

  • Follows established patterns from other Google integrations (Calendar, Drive, etc.)
  • Proper type coercion in tools.config.params (converting pageSize to number during execution)
  • Space ID normalization handles both spaces/AAAA1234 and AAAA1234 formats
  • Comprehensive error handling with descriptive error messages
  • All files follow project code style guidelines with TSDoc comments and absolute imports
  • OAuth scopes properly described in oauth-required-modal
  • Documentation includes correct input/output specifications

The implementation is thorough, well-structured, and maintains consistency with the existing codebase.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All files follow established patterns, include proper error handling, use correct OAuth configuration, and maintain code quality standards. The implementation is complete with tools, blocks, icons, OAuth setup, and documentation.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/tools/google_chat/send_message.ts Correctly implements Google Chat send message functionality with proper OAuth, error handling, and space ID normalization
apps/sim/tools/google_chat/list_spaces.ts Properly implements Google Chat list spaces with pagination support and filtering
apps/sim/blocks/blocks/google_chat.ts Well-structured block config with proper operation routing and type coercion in params function
apps/sim/lib/oauth/oauth.ts OAuth provider configuration properly added with correct scopes and icons
apps/docs/content/docs/en/tools/google_chat.mdx Comprehensive documentation with correct input/output specifications

Sequence Diagram

sequenceDiagram
    participant User
    participant Block as Google Chat Block
    participant OAuth as OAuth Provider
    participant Tool as Google Chat Tool
    participant API as Google Chat API

    User->>Block: Select operation (Send Message/List Spaces)
    User->>Block: Configure OAuth credential
    Block->>OAuth: Request access token
    OAuth-->>Block: Return access token
    
    alt Send Message
        User->>Block: Enter space ID, message, thread key
        Block->>Tool: google_chat_send_message
        Tool->>API: POST /v1/spaces/{spaceId}/messages
        API-->>Tool: Message created
        Tool-->>Block: messageName, spaceName, threadName, text, createTime
    else List Spaces
        User->>Block: Set filter, pageSize
        Block->>Tool: google_chat_list_spaces
        Tool->>API: GET /v1/spaces?filter&pageSize
        API-->>Tool: Spaces list
        Tool-->>Block: spaces[], nextPageToken
    end
    
    Block-->>User: Display results
Loading

Last reviewed commit: 5cccde3

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

15 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

15 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

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.

1 participant