hermes - 💡(How to fix) Fix google-workspace skill: add multi-account support [1 participants]

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…
GitHub stats
NousResearch/hermes-agent#15602Fetched 2026-04-26 05:26:17
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

The productivity/google-workspace skill is single-account by design — the OAuth setup writes one token at ~/.hermes/google_token.json and google_api.py reads from that fixed path. For users with both a personal and a work Google Workspace account, this means only one is reachable through hermes; the other has to be routed through an external tool.

I've been hitting this on my own setup (personal @gmail.com + work @reimaginerobotics.ai). My agent currently can't reply to "check my work email" without me wiring an unrelated CLI (gog) on the side. Filing this in case there's appetite for a vendor-supported path.

Root Cause

The productivity/google-workspace skill is single-account by design — the OAuth setup writes one token at ~/.hermes/google_token.json and google_api.py reads from that fixed path. For users with both a personal and a work Google Workspace account, this means only one is reachable through hermes; the other has to be routed through an external tool.

I've been hitting this on my own setup (personal @gmail.com + work @reimaginerobotics.ai). My agent currently can't reply to "check my work email" without me wiring an unrelated CLI (gog) on the side. Filing this in case there's appetite for a vendor-supported path.

Fix Action

Fix / Workaround

A reference implementation already exists outside hermes (the gog CLI from steipete supports --account natively + handles per-account scopes). That's the workaround I'm using locally and what this issue would let users skip.

Code Example

# Add a second account
$GSETUP --account work@example.com --auth-url
$GSETUP --account work@example.com --auth-code <code>
$GSETUP --check --account work@example.com   # AUTHENTICATED: ...

# Use it
google_api.py --account work@example.com gmail search 'is:unread'
RAW_BUFFERClick to expand / collapse

Summary

The productivity/google-workspace skill is single-account by design — the OAuth setup writes one token at ~/.hermes/google_token.json and google_api.py reads from that fixed path. For users with both a personal and a work Google Workspace account, this means only one is reachable through hermes; the other has to be routed through an external tool.

I've been hitting this on my own setup (personal @gmail.com + work @reimaginerobotics.ai). My agent currently can't reply to "check my work email" without me wiring an unrelated CLI (gog) on the side. Filing this in case there's appetite for a vendor-supported path.

Proposed shape

Optional --account <email> flag throughout setup.py and google_api.py. Per-account token files at ~/.hermes/google_tokens/<email>.json (with the existing google_token.json symlinked to a configured default for backward compat). When the flag is omitted, behavior matches today — single-account, default token file.

# Add a second account
$GSETUP --account [email protected] --auth-url
$GSETUP --account [email protected] --auth-code <code>
$GSETUP --check --account [email protected]   # AUTHENTICATED: ...

# Use it
google_api.py --account [email protected] gmail search 'is:unread'

OAuth flow already supports per-call client_secret + scope selection, so the change is mostly:

  1. setup.py — parameterize TOKEN_PATH on --account (or fall back to default)
  2. google_api.py — same, plus thread the flag through to credential loading
  3. SKILL.md — document the multi-account flow

Existing single-account workflows stay unchanged when the flag is omitted.

Why now

A reference implementation already exists outside hermes (the gog CLI from steipete supports --account natively + handles per-account scopes). That's the workaround I'm using locally and what this issue would let users skip.

Happy to PR

If maintainers agree on the shape (per-account token files, optional flag, no breaking change), I can put up a PR. Wanted to surface the design first rather than land code that conflicts with whatever's already planned.

extent analysis

TL;DR

To support multiple Google Workspace accounts, add an optional --account flag to setup.py and google_api.py to allow per-account token files.

Guidance

  • Modify setup.py to parameterize the TOKEN_PATH based on the --account flag, falling back to the default token file if the flag is omitted.
  • Update google_api.py to thread the --account flag through to credential loading, allowing it to read from the corresponding per-account token file.
  • Document the multi-account flow in SKILL.md to ensure users understand the new functionality.
  • Consider creating a symlink for the existing google_token.json file to maintain backward compatibility.

Example

No code snippet is provided as the issue already includes a proposed implementation.

Notes

The proposed solution does not introduce breaking changes, ensuring existing single-account workflows remain unaffected when the --account flag is omitted.

Recommendation

Apply the proposed workaround by adding the --account flag and per-account token files, as it provides a clear and backward-compatible solution to support multiple Google Workspace accounts.

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