Skip to content

Google Chat adapter: implement file upload support #59

@patrick-chinchill

Description

@patrick-chinchill

Missing capability — upstream also marks as TODO.

Current state

Python Google Chat `post_message` parses file attachments from messages but ignores them when posting (logs a warning and moves on):

  • `src/chat_sdk/adapters/google_chat/adapter.py:1335-1340`

Upstream TS has the same stub — it's a multi-step API (upload to Drive → get a reference → attach to the message), and neither port has the full flow yet.

File downloads work via the `media.download` API — this issue is just uploads.

Why it matters

Consumers posting messages with attached files (screenshots, reports, generated artifacts) on Google Chat get silent drops instead of delivered attachments.

Fix

Implement Google Chat upload flow per Google's docs:

  1. `POST /v1/media:upload` with multipart body to create a media reference
  2. Use the returned attachment resource name in `messages.create` payload
  3. Handle OAuth scopes (`chat.messages.create`) and service account auth

Acceptance

  • `post_message` with `files=[FileUpload(...)]` uploads and attaches
  • Works with both user OAuth and service account auth
  • Regression test using recorded fixtures
  • Entry in `docs/UPSTREAM_SYNC.md` non-parity table cleared

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions