hermes - 💡(How to fix) Fix productivity/google-workspace: CLI wrapper missing attachment download

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The bundled productivity/google-workspace skill exposes a clean CLI for search, list, get-message, and send via scripts/google_api.py, but does not surface attachment download. Reading an email with attachments via the agent leaves it stuck — it tries to download via the CLI, finds no verb, and either falls back to ad-hoc Python or loops on the missing capability.

Root Cause

The SKILL.md actively encourages searches like has:attachment filename:pdf newer_than:7d — but once the agent finds attachment-bearing emails, there's no skill-supported next step. Operationally this means the agent either fabricates a download path or asks the user to fetch manually from the Gmail UI.

Fix Action

Fix / Workaround

Workarounds users have today

RAW_BUFFERClick to expand / collapse

Summary

The bundled productivity/google-workspace skill exposes a clean CLI for search, list, get-message, and send via scripts/google_api.py, but does not surface attachment download. Reading an email with attachments via the agent leaves it stuck — it tries to download via the CLI, finds no verb, and either falls back to ad-hoc Python or loops on the missing capability.

Reproduction

  1. Set up the skill normally (run setup.py, complete OAuth flow).
  2. Ask the agent (via any gateway — Slack/Telegram) to read or summarize an email that has attachments.
  3. Agent finds the message, identifies attachments in the payload, then has no skill-provided way to fetch them.

Where the gap is

The CLI wrapper at skills/productivity/google-workspace/scripts/google_api.py does not expose any verb for gmail.users().messages().attachments().get(...). Other operations (search, list, get-message, send, labels) are present.

The underlying google-api-python-client library fully supports attachment fetch — the gap is purely in the skill's CLI surface.

Suggested fix

Add a verb such as:

gmail attachment get <message_id> <attachment_id> <output_path>

Implementation outline:

msg = gmail.users().messages().get(userId='me', id=msg_id, format='full').execute()
# walk parts to map attachment_id → filename/mimeType for discoverability
att = gmail.users().messages().attachments().get(
    userId='me', messageId=msg_id, id=attachment_id
).execute()
data = base64.urlsafe_b64decode(att['data'])
Path(output_path).write_bytes(data)

A companion gmail attachment list <message_id> returning [{attachment_id, filename, mime_type, size_bytes}, ...] would help the agent discover attachment IDs without reading the full message payload twice.

Why this matters

The SKILL.md actively encourages searches like has:attachment filename:pdf newer_than:7d — but once the agent finds attachment-bearing emails, there's no skill-supported next step. Operationally this means the agent either fabricates a download path or asks the user to fetch manually from the Gmail UI.

Workarounds users have today

  • Tell the agent in user-memory to skip attachments and summarize body only.
  • Have the agent write ad-hoc Python using the library directly. Works but bypasses the skill's CLI contract and isn't reproducible across sessions.

Happy to send a PR if interested.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix productivity/google-workspace: CLI wrapper missing attachment download