Skip to content

Google Workspace

lynox integrates with Google Workspace to read and write your business data. Once connected, you can ask lynox to check your email, create calendar events, analyze spreadsheets, and more.

You need a Google Cloud project with OAuth 2.0 credentials. This takes about 5 minutes.

  1. Open the Google Cloud Console
  2. Click the project selector at the top → New Project
  3. Name it (e.g. “lynox”) and click Create

If you already have a project, select it instead.

  1. In the sidebar, go to APIs & ServicesLibrary
  2. Search for each of these APIs and click Enable:
API nameWhat it’s used for
Gmail APIRead and send email
Google Drive APIAccess files in Drive
Google Calendar APIRead and manage events
Google Sheets APIRead and edit spreadsheets
Google Docs APIRead and edit documents
  1. In the sidebar, go to OAuth consent screen
  2. If you see “Google Auth Platform not configured yet”, click Get Started
  3. App information — Enter an app name (e.g. “lynox”) and select your email as support email → Next
  4. Audience — pick the right user type (see below) → Next
  5. Contact information — Enter your email → Next
  6. Finish → Click Create

Internal vs. External — pick the right one

Section titled “Internal vs. External — pick the right one”
User typePick when…Tradeoffs
Internal (recommended if available)You have a Google Workspace account and only Workspace users will connectNo Google verification ever, refresh tokens never expire, no test-user list
ExternalYou use a personal @gmail.com account, or want non-Workspace users to connectApp starts in “Testing” mode: max 100 test users, refresh tokens expire after 7 days until you go through Google verification (CASA for Gmail/Drive scopes)

“Internal” only appears if your account belongs to a Workspace organization. If you don’t see it, pick “External”.

The application type depends on your deployment:

  1. In the sidebar, go to Credentials
  2. Click Create CredentialsOAuth client ID
  3. Application type → select Desktop app
  4. Name → enter anything (e.g. “lynox”)
  5. Click Create
  6. Copy the Client ID and Client Secret
  1. In the sidebar, go to Credentials
  2. Click Create CredentialsOAuth client ID
  3. Application type → select Web application
  4. Name → enter anything (e.g. “lynox”)
  5. Authorized redirect URIs → click Add URI → enter https://<your-subdomain>.lynox.cloud/api/google/callback
  6. Click Create
  7. Copy the Client ID and Client Secret
ErrorCauseFix
”Wrong client type”Wrong application type for your deploymentSelf-hosted: Desktop app · Managed: Web application
”Invalid Client ID”Client ID is wrong or has extra whitespaceCopy the Client ID again from Credentials page
Device flow not startingAPIs not enabledVerify all 5 APIs are enabled (step 2)
“Access blocked”Not added as test userAdd your email under OAuth consent screen → Test users
Callback returns 401Outdated lynox versionUpdate to the latest version
”redirect_uri_mismatch”Redirect URI doesn’t matchVerify the URI in Google Console matches exactly

Via Web UI: Settings → Integrations → Google Workspace. Enter Client ID and Secret, then authorize.

Via environment variables:

Terminal window
export GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
export GOOGLE_CLIENT_SECRET=GOCSPX-...

lynox supports three OAuth flows:

FlowBest forClient typeHow it works
RedirectManaged hosting / web-hostedWeb applicationRedirects to Google, sends you back after approval
Device FlowSelf-hosted Docker / headlessDesktop appShows a code to enter at google.com/device
Service AccountServer-to-serverUses a key file, no user interaction

The Web UI detects your deployment and uses the correct flow automatically.

The Web UI offers a toggle between two access levels:

LevelWhat it includes
Read only (default)Read Gmail, Sheets, Drive, Calendar, Docs
Full accessEverything above + send email, create events, edit sheets/docs, upload files

You can switch the access level anytime in Settings → Integrations → Google Workspace. Changing the level requires re-authorization with Google (one click).

For advanced use, scopes can also be set via config:

{
"google_oauth_scopes": [
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/calendar.events"
]
}

Once you’ve connected Google, your Gmail mailbox automatically appears in Settings → Integrations → Mail alongside any IMAP/SMTP accounts. The same mail tools (mail_triage, mail_search, mail_read, mail_send, mail_reply) work across all mailboxes — there is no separate Gmail tool.

  • “What’s in my inbox today?” (spans Gmail + IMAP if you have both)
  • “Find emails from [contact] about [topic]”
  • “Draft a reply to the last email from [name]”
  • “Send a follow-up to [contact]” (requires write scope)
  • “Summarize the Q1 revenue sheet”
  • “Add a row to my expenses tracker” (requires write scope)
  • “Compare last month’s numbers with this month”
  • “Find the proposal document from last week”
  • “Summarize the PDF in my Drive called [name]“
  • “What meetings do I have tomorrow?”
  • “Schedule a call with [name] next Tuesday at 10am” (requires write scope)
  • “Block 2 hours for deep work this afternoon” (requires write scope)
  • “Summarize the meeting notes in [document]”
  • “Update the project status section” (requires write scope)

OAuth tokens are stored encrypted in the lynox vault (requires LYNOX_VAULT_KEY). Tokens refresh automatically — you only need to authorize once.

You can revoke access anytime via the Web UI (Settings → Integrations → Google → Revoke).