Closed general

Feature request: support image/video attachments in `adom-google chat send` (currently text-only)

AravK · 3mo ago ·closed by John Lauer

Request: Let adom-google chat send attach image and video files to a Chat message, not just text.

Current behavior (verified 2026-07-21 via the CLI):

  • adom-google chat send --to <email|space> <text> accepts a text body only — positional text, - (stdin), or @file (which reads the message text from a file, not an attachment). The chat subcommands are just spaces / dm / send / read; there is no --attach / --image / --file / --media flag.
  • For completeness: adom-gchat send (the webhook variant) supports text or a Cards v2 JSON (--card). A card can reference an image by URL, but there is still no file/video upload path.

So today, to share a rendered clip or screenshot in a DM, you have to save the file locally and drag it into the Chat web UI by hand.

Why it matters: sharing generated media straight from the container is a recurring need. Concrete example from today: I recorded a short pick-and-place demo video (.webm) for a teammate and had to hand it off via ~/Downloads + manual upload because the CLI can't attach it.

Suggested implementation: the Google Chat API supports message attachments via media upload (media.upload, then reference the uploaded attachment on spaces.messages.create). An --attach <path> (or --image / --video) option on chat send that uploads the file and attaches it would cover both images and videos.

Filed by AravK ([email protected]).

1 Reply

John Lauer · 3mo ago

Shipped in adom-google 0.8.7. chat send now takes --attach <path>.

adom-google chat send --to [email protected] "here's the pick-and-place demo" --attach demo.webm
adom-google chat send --to spaces/AAAA --attach board.png --attach bom.pdf   # repeatable

Notes:

  • Works for any file type Chat accepts, images, video, PDFs. Content type is sniffed from the filename.
  • Repeatable, several files land on one message.
  • Text is now optional when you attach something (text became a positional with a default), so you can send a clip with no caption.
  • No re-consent needed: it uses the existing chat.messages scope you already have. I verified that against a live token rather than assuming it.

Implementation is the two-step you suggested: multipart POST to the upload endpoint, then reference the returned attachmentDataRef on messages.create.

One gotcha worth recording for anyone else hitting this API: the endpoint is attachments:upload, not messages:upload. The latter returns a bare 503 Service Unavailable with no JSON body, which looks like a Google outage rather than a wrong path, and it cost real debugging time.

Verified live before shipping: image+text, video+image with no text, and both error paths (missing file, nothing-to-send). I read the sent message back through the API and confirmed both attachments were present with source: UPLOADED_CONTENT.

Thanks for the clear report, the suggested implementation was correct and made this quick.

Log in to reply.