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. Create a Google Cloud project
Section titled “1. Create a Google Cloud project”- Open the Google Cloud Console
- Click the project selector at the top → New Project
- Name it (e.g. “lynox”) and click Create
If you already have a project, select it instead.
2. Enable APIs
Section titled “2. Enable APIs”- In the sidebar, go to APIs & Services → Library
- Search for each of these APIs and click Enable:
| API name | What it’s used for |
|---|---|
Gmail API |
Read and send email |
Google Drive API |
Access files in Drive |
Google Calendar API |
Read and manage events |
Google Sheets API |
Read and edit spreadsheets |
Google Docs API |
Read and edit documents |
3. Configure the OAuth consent screen
Section titled “3. Configure the OAuth consent screen”- In the sidebar, go to OAuth consent screen
- If you see “Google Auth Platform not configured yet”, click Get Started
- App information — Enter an app name (e.g. “lynox”) and select your email as support email → Next
- Audience — pick the right user type (see below) → Next
- Contact information — Enter your email → Next
- Finish → Click Create
Internal vs. External — pick the right one
Section titled “Internal vs. External — pick the right one”| User type | Pick when… | Tradeoffs |
|---|---|---|
| Internal (recommended if available) | You have a Google Workspace account and only Workspace users will connect | No Google verification ever, refresh tokens never expire, no test-user list |
| External | You use a personal @gmail.com account, or want non-Workspace users to connect |
App starts in “Testing” mode: max 100 test users, and refresh tokens expire after 7 days. That expiry is tied to the publishing status, not to verification — see the note below |
“Internal” only appears if your account belongs to a Workspace organization. If you don’t see it, pick “External”.
4. Create OAuth credentials
Section titled “4. Create OAuth credentials”The application type depends on your deployment:
Self-hosted (Docker / local)
Section titled “Self-hosted (Docker / local)”- In the sidebar, go to Credentials
- Click Create Credentials → OAuth client ID
- Application type → select Desktop app
- Name → enter anything (e.g. “lynox”)
- Click Create
- Copy the Client ID and Client Secret
Managed hosting (lynox.cloud)
Section titled “Managed hosting (lynox.cloud)”- In the sidebar, go to Credentials
- Click Create Credentials → OAuth client ID
- Application type → select Web application
- Name → enter anything (e.g. “lynox”)
- Authorized redirect URIs → click Add URI → enter
https://<your-subdomain>.lynox.cloud/api/google/callback - Click Create
- Copy the Client ID and Client Secret
Troubleshooting
Section titled “Troubleshooting”| Error | Cause | Fix |
|---|---|---|
| “Wrong client type” | Wrong application type for your deployment | Self-hosted: Desktop app · Managed: Web application |
| “Invalid Client ID” | Client ID is wrong or has extra whitespace | Copy the Client ID again from Credentials page |
| Device flow not starting | APIs not enabled | Verify all 5 APIs are enabled (step 2) |
| “Access blocked” | Not added as test user | Add your email under OAuth consent screen → Test users |
| Callback returns 401 | Outdated lynox version | Update to the latest version |
| “redirect_uri_mismatch” | Redirect URI doesn’t match | Verify the URI in Google Console matches exactly |
Configure
Section titled “Configure”Via Web UI: Settings → Integrations → Google Workspace. Enter Client ID and Secret, then authorize.
Via environment variables:
export GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.comexport GOOGLE_CLIENT_SECRET=GOCSPX-...Authorization
Section titled “Authorization”lynox supports three OAuth flows:
| Flow | Best for | Client type | How it works |
|---|---|---|---|
| Redirect | Managed hosting / web-hosted | Web application | Redirects to Google, sends you back after approval |
| Device Flow | Self-hosted Docker / headless | Desktop app | Shows a code to enter at google.com/device |
| Service Account | Server-to-server | — | Uses a key file, no user interaction |
The Web UI detects your deployment and uses the correct flow automatically.
Access Level
Section titled “Access Level”The card offers two named levels. They are not “read” and “write” — Google’s own axis is how much data a scope exposes, which is why full calendar access including deletion is only sensitive while a headers-only mailbox scope is restricted.
| Level | What it asks Google for | What that costs |
|---|---|---|
| Standard (default) | Your identity and email address, calendar events, free/busy, and the Drive files lynox creates (drive.file) |
App verification. No CASA assessment — nothing in this set is restricted. |
| Full | Standard, plus Sheets, Docs, Calendar and Gmail-send, plus Gmail reading and full Drive | Verification and an annual CASA security assessment, because it includes restricted scopes. |
What Standard does not include, so nothing here is a surprise later: no Gmail access of any kind, no access to spreadsheets or documents you did not create through lynox, and no access to Drive files lynox did not create. Asking lynox to read an existing spreadsheet on a Standard connection is refused with the scope it would need, not attempted and failed.
Choosing Full changes where your mail comes from. Full includes a Gmail read scope, and lynox then reads that mailbox over the Google connection instead of over IMAP. If you have the mailbox connected as IMAP as well, that is the switch to be aware of.
Switching levels requires re-authorising with Google. A connection made before these two levels existed keeps working and shows as legacy — nothing changes until you pick a level.
For advanced use, scopes can be set directly. The accepted list is wider than the two levels above, for two different reasons — and only the first is about you:
- Scopes lynox used to request. A connection made before the levels existed keeps working; nothing it was granted is rejected now.
- Scopes lynox has never requested but Google classifies, such as
gmail.metadataor the blanketcalendar. They are accepted if your grant already carries them; lynox will not ask for them.
Anything outside that list is rejected:
{ "google_oauth_scopes": [ "https://www.googleapis.com/auth/calendar.events", "https://www.googleapis.com/auth/drive.file" ]}What You Can Do
Section titled “What You Can Do”Gmail — only on a Full connection
Section titled “Gmail — only on a Full connection”Gmail is not part of the Standard set. On a Full connection your Gmail mailbox appears in
Settings → Integrations → Mail alongside any IMAP/SMTP accounts, and the same mail tools
(mail_triage, mail_search, mail_read, mail_send, mail_reply) work across all of them — there is
no separate Gmail tool. On a Standard connection the mailbox is not registered at all and the card says
so; connect it over IMAP with an app password instead.
- “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]”
Google Sheets — only on a Full connection
Section titled “Google Sheets — only on a Full connection”Standard grants no Sheets access. A read on a Standard connection is refused naming the scope it needs.
- “Summarize the Q1 revenue sheet”
- “Add a row to my expenses tracker”
- “Compare last month’s numbers with this month”
Google Drive — files lynox created, unless you go Full
Section titled “Google Drive — files lynox created, unless you go Full”Standard grants drive.file, which reaches only what lynox itself created or you explicitly picked.
Searches say so in their result rather than reporting an empty Drive.
- “Find the proposal document from last week” (only if lynox created it)
- “Summarize the PDF in my Drive called [name]” (same)
Google Calendar — in the Standard set
Section titled “Google Calendar — in the Standard set”Creating, moving and deleting events needs no upgrade: calendar.events is part of Standard. Each
change is confirmed before it happens.
- “What meetings do I have tomorrow?”
- “Schedule a call with [name] next Tuesday at 10am”
- “Block 2 hours for deep work this afternoon”
Google Docs — only on a Full connection
Section titled “Google Docs — only on a Full connection”Standard grants no Docs access at all, reading included.
- “Summarize the meeting notes in [document]”
- “Update the project status section”
Token Storage
Section titled “Token Storage”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).