Skip to content
← Public packages

@kody/google

Call Gmail, Calendar, Tasks, Drive, Docs, Sheets, People, YouTube, and Analytics through saved Google OAuth.

Featured
  • Integrations
  • google
  • gmail
  • inbox
  • calendar
  • tasks
  • drive
  • docs
  • sheets
  • people
  • youtube
  • analytics
  • oauth
  • multi-account
Version
1.0.0
License
MIT
Published
September 10, 2026
Pinned commit
196339c
Rating
★ 4.8 (5)
Forks
40
Adaptation effort
1.8

@kody/google

Intent

One Google helpers package for Kody agents: Gmail (including inbox read), Calendar, Tasks, Drive, Docs, Sheets, People, YouTube, YouTube Analytics, and GA4. Auth is OAuth — not an API key and not a bot token. Multi-account uses the saved integration name (google, google-work, google-youtube, …), never a hard-coded brand alias.

Inbox reading and Drive-wide access stay in this package and need gmail.readonly / drive.readonly on your Google OAuth client. Do not split Tasks or Gmail into other packages.

What it does

  • Read or send Gmail (inbox list, search, drafts, threaded reply drafts, send)
  • Calendar events, Tasks, Docs, Sheets, People/contacts
  • Drive search/metadata/export (Drive-wide needs drive.readonly)
  • YouTube Data, YouTube Analytics, and GA4 reports
  • Multi-account via integration / account (google or google-<purpose>)
  • Mutations accept dryRun: true to preview without writing

Prerequisites / setup

Auth is OAuth. Tokens are stored by Kody. Do not paste client secrets or refresh tokens into chat. There is no API-key path — do not create a secret at /account/secrets/new for this package. Client ID and secret belong only on the /connect/oauth form.

Redirect URI: https://kody.codes/connect/oauth

  1. Google Cloud Console → create or select a project; enable the APIs you will call (Gmail, Drive, Calendar, …).
  2. Google Auth Platform → Audience External; create a Web application client with redirect URI exactly https://kody.codes/connect/oauth.
  3. Data Access: add needed scopes; keep openid email profile so smoke works. Inbox needs gmail.readonly (and send/compose for mail writes). Drive-wide needs drive.readonly / drive. YouTube Analytics needs yt-analytics.readonly. GA4 needs analytics.readonly.
  4. While status is Testing, add yourself as a test user, then Publish app to Production (Testing refresh tokens expire after seven days).
  5. Connect with a prefilled URL and paste client ID/secret only on that form.

Gmail inbox:

https://kody.codes/connect/oauth?provider=google&authorizeUrl=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Fv2%2Fauth&tokenUrl=https%3A%2F%2Foauth2.googleapis.com%2Ftoken&flow=confidential&scopes=openid%20email%20profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&allowedHosts=www.googleapis.com%2Cgmail.googleapis.com%2Copenidconnect.googleapis.com%2Coauth2.googleapis.com&extraAuthorizeParams=%7B%22access_type%22%3A%22offline%22%2C%22prompt%22%3A%22consent%22%7D

Drive-wide:

https://kody.codes/connect/oauth?provider=google&authorizeUrl=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Fv2%2Fauth&tokenUrl=https%3A%2F%2Foauth2.googleapis.com%2Ftoken&flow=confidential&scopes=openid%20email%20profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.readonly&allowedHosts=www.googleapis.com%2Copenidconnect.googleapis.com%2Coauth2.googleapis.com&extraAuthorizeParams=%7B%22access_type%22%3A%22offline%22%2C%22prompt%22%3A%22consent%22%7D

Typical personal BYO (inbox + Drive-wide + send + Calendar + Tasks):

https://kody.codes/connect/oauth?provider=google&authorizeUrl=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Fv2%2Fauth&tokenUrl=https%3A%2F%2Foauth2.googleapis.com%2Ftoken&flow=confidential&scopes=openid%20email%20profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.send%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.compose%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ftasks&allowedHosts=www.googleapis.com%2Cgmail.googleapis.com%2Ctasks.googleapis.com%2Cpeople.googleapis.com%2Cdocs.googleapis.com%2Csheets.googleapis.com%2Copenidconnect.googleapis.com%2Coauth2.googleapis.com&extraAuthorizeParams=%7B%22access_type%22%3A%22offline%22%2C%22prompt%22%3A%22consent%22%7D

Multiple accounts

Default integration is google. Extra accounts: google-<purpose> (connect ?provider=google-work, call with integration: 'google-work' or account: 'work'). A YouTube Brand Account is another connection (provider=google-youtube), not a reserved alias.

Required hosts

Approve on the connection (allowedHosts on the connect URL): www.googleapis.com, gmail.googleapis.com, people.googleapis.com, tasks.googleapis.com, docs.googleapis.com, sheets.googleapis.com, youtube.googleapis.com, youtubeanalytics.googleapis.com, analyticsdata.googleapis.com, openidconnect.googleapis.com, oauth2.googleapis.com.

Agents: see AGENTS.md for import paths and smoke checks.

Done when

  • A Google OAuth Web client is connected; needed scopes and hosts are approved
  • Smoke test returns the Google profile for that integration
  • Inbox / Drive / Calendar helpers work for the scopes you granted
  • Mutations preview with dryRun: true before live writes

Branding

The community icon is Google's official G mark (blue / red / yellow / green) on white. Google and the G logo are trademarks of Google LLC. This package is not affiliated with or endorsed by Google.

Docs

Report this listing

Log in to report this listing.