Skip to main content

Google Workspace

Gmail, Calendar, Drive, Docs and Sheets through your own Google OAuth client.

Connect it with: Sign in (OAuth). Google Workspace's own documentation: https://developers.google.com/identity/protocols/oauth2/web-server.

What agents can do​

Connect Google Workspace so the agents working your tasks can reach it. With it connected, they can:

  • Read your calendar to find free time or prepare for a meeting.
  • Read a Google Doc or Sheet a task links to.
  • Update a Google Sheet with results, if you granted Sheets access.
  • Read Drive files or read and send Gmail, once you add those scopes to the secret (see Limitations).

Before you start​

  • A Google account (Workspace or personal).
  • A Google Cloud project with an OAuth client of type Web application, whose authorised redirect URI is the one shown under Use your own OAuth app, and the APIs agents need enabled (Gmail API, Google Calendar API, Google Drive API, Google Sheets API) under APIs & Services > Library.
  • If the project's OAuth consent screen is in Testing, the account you connect added as a test user (Google Auth Platform > Audience > Test users).
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Google Workspace​

This is the quickest way in: you sign in to Google Workspace and approve what Jaah asks for. You never copy a key.

  1. In Jaah, open Secrets and select New.
  2. Search for Google Workspace and select its card.
  3. Give the secret a name you will recognize, such as the account or workspace it reaches, and choose who can use it (see Who can use it).
  4. Select Connect Google Workspace. Google Workspace's sign-in window opens.
  5. Sign in to Google Workspace if asked, check the access listed, and approve it.
  6. You land back in Jaah on the new secret, which reads Connected once its test passes.

If the button reads Jaah app not configured, this Jaah has no app registered at Google Workspace yet. Use your own OAuth app until it does (see Use your own OAuth app).

Scopes Jaah requests​

Jaah asks Google Workspace for these scopes, and no others. A scope marked optional is a checkbox on the Connect screen: untick it and agents simply cannot do that part.

ScopeWhy Jaah asks for itRequired
openidConfirm who signed inYes
emailSee the account's email address, so the connection shows whose it isYes
https://www.googleapis.com/auth/calendar.readonlyRead calendars and events, to check availability and prepare for meetingsYes
https://www.googleapis.com/auth/documents.readonlyRead Google Docs agents are pointed atNo — you may untick it
https://www.googleapis.com/auth/spreadsheetsRead and edit Google SheetsNo — you may untick it

Connect with an API key​

Google Workspace has no API key option in Jaah: connect with the sign-in above.

Use your own OAuth app​

Register your own OAuth app at Google Workspace when your company requires apps it controls, or before this Jaah has an app registered there.

  1. Create an OAuth app in Google Workspace's developer settings (Google Workspace's documentation).
  2. Set its redirect URI to https://app.jaah.ai/api/credentials/connect/callback (on your own Jaah, its console address followed by /api/credentials/connect/callback).
  3. Give it the scopes in Scopes Jaah requests.
  4. Copy its client ID and client secret.
  5. In Jaah, start a new Google Workspace secret, select Use your own OAuth app, paste both values and select Connect Google Workspace.

The client secret is stored with the connection, encrypted, like any other secret value.

Test the connection​

Select Test on the secret. Jaah makes one read-only call to Google Workspace with the stored values and shows the result on the secret's page. Jaah also tests automatically when you save or reconnect.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A signed-in connection hands the agent a live access_token, with access_token_expires_at. Jaah refreshes it before it expires, so an agent never handles a refresh token.

Tell the agent in your task description which secret to use, for example “use the Google Workspace secret org/google”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Reconnect: when Google Workspace ends the grant (a password change, a revoked app, an expired refresh), the secret shows Needs reconnect. Select Reconnect and sign in again; agents get the new token on their next call.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Google Workspace's side too, revoke Jaah in Google Workspace's settings.

Limitations​

  • This Jaah has no Google app of its own yet, so every connection runs on your own Google Cloud OAuth client: enter its client ID and secret on the Connect screen.
  • Gmail and Drive are not asked for by default. To add them, open the secret, add the scope (for example https://www.googleapis.com/auth/gmail.readonly or https://www.googleapis.com/auth/drive.readonly) to its Scopes field, and select Connect on the secret's page.
  • Gmail and Drive read scopes are restricted by Google: an External consent screen in Production needs Google's verification before accounts outside your Workspace can grant them. Use an Internal consent screen to connect only your Workspace's accounts.
  • A consent screen left in Testing issues refresh tokens that expire after 7 days; publish it to keep the connection alive.
  • Agents can do only what the connected Google Workspace account and its granted scopes allow.

Troubleshooting​

Google shows Error 400 redirect_uri_mismatch

Add the redirect URI shown on this page, byte for byte, under your OAuth client's Authorised redirect URIs in Google Cloud > APIs & Services > Credentials.

Google shows Access blocked: this app has not completed the Google verification process

Your consent screen is External and in Testing. Add the account under Audience > Test users, or switch the app to Internal for a Workspace.

Test says the refresh token was rejected (invalid_grant)

The grant was revoked, the password changed, or a Testing consent screen let it expire after 7 days. Select Reconnect.

Agents get 403 accessNotConfigured

The API is not enabled in your Google Cloud project. Enable it under APIs & Services > Library.

Still stuck? Select Test and read the result: it names the value Google Workspace refused and the status it answered.

FAQ​

Why do I need my own Google OAuth client?

Google requires a verified app for Gmail and Drive access. Until Jaah's own app passes that review, your own client keeps your data under your project's control.

Can I connect a shared mailbox or another user's calendar?

Connect as that account, or as a user it is shared with: agents see what the signed-in account sees.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Google Workspace account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.