Skip to content

Google Services OAuth (Individual Setup)

This guide is for one person running MindRoom and creating their own Google OAuth app.

For team/shared deployments, use Google Services OAuth (Admin Setup).

What You Need Before Starting

  • A Google account
  • Access to Google Cloud Console
  • A running MindRoom instance with the bundled dashboard (default URL: http://localhost:8765)

The callback path is always:

/api/google/callback

So the default full callback URL is:

http://localhost:8765/api/google/callback

Step 1: Create Google Cloud Project

  1. Open Google Cloud Console.
  2. Create or select a project.
  3. Save the project ID for GOOGLE_PROJECT_ID.

Step 2: Enable APIs

  1. Go to APIs & Services → Library.
  2. Enable:
  3. Gmail API
  4. Google Calendar API
  5. Google Drive API
  6. Google Sheets API
  1. Go to APIs & Services → OAuth consent screen.
  2. Choose External.
  3. Fill required fields and save.
  4. Add your own email as a test user.
  5. Add scopes:
  6. https://www.googleapis.com/auth/gmail.readonly
  7. https://www.googleapis.com/auth/gmail.modify
  8. https://www.googleapis.com/auth/gmail.compose
  9. https://www.googleapis.com/auth/calendar
  10. https://www.googleapis.com/auth/spreadsheets
  11. https://www.googleapis.com/auth/drive.file
  12. openid
  13. https://www.googleapis.com/auth/userinfo.email
  14. https://www.googleapis.com/auth/userinfo.profile

Step 4: Create OAuth Client ID

  1. Go to APIs & Services → Credentials.
  2. Click Create Credentials → OAuth client ID.
  3. Choose Web application.
  4. Add redirect URI:
  5. http://localhost:8765/api/google/callback
  6. Copy client ID and client secret.

Step 5: Configure MindRoom

Add this to .env (or export in your shell):

MINDROOM_PORT=8765
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_REDIRECT_URI=http://localhost:8765/api/google/callback

Restart MindRoom.

Step 6: Verify MindRoom Reads Credentials

Run:

curl -s http://localhost:8765/api/google/status

Expected: - "has_credentials": true

Step 7: Connect in Frontend

  1. Open Integrations → Google Services.
  2. Click Login with Google.
  3. Sign in and approve requested scopes.
  4. You should see Connected and your available services.

Step 8: Enable Google Tools in config.yaml

After OAuth is connected, add Google tools to your agent config:

agents:
  email_assistant:
    display_name: Email Assistant
    role: Help manage and respond to emails
    tools:
      - gmail
      - google_calendar
      - google_sheets
    instructions:
      - Search important unread emails first.
      - Draft replies and ask for confirmation before sending.

Gmail tool capabilities include: - gmail_search: Search emails with Gmail query syntax (for example is:unread or from:boss@company.com) - gmail_latest: Read latest inbox emails - gmail_unread: Read unread emails only

After editing config.yaml, restart MindRoom to reload configuration.

Disconnect Later (Optional)

  1. In MindRoom frontend, click Disconnect Google Account.
  2. Optional: also revoke app access in Google Account Permissions.

Troubleshooting

"Admin Setup Required" shown in frontend

MindRoom does not have valid Google OAuth env vars yet.

"Failed to complete OAuth flow"

Check redirect URI exact match between Google Cloud Console and MindRoom.

Access blocked by Google

If your app is in testing mode, ensure your account is listed as a test user.