How to connect Claude Code to your entire Google Workspace and multiply your productivity
By David Rosic, AI Implementation Expert · 2026-07-28
Claude Code can operate your entire Google Workspace. Gmail, Drive, Docs, Sheets, Slides, Calendar, Tasks and Forms, through one open source command line tool, one authentication, and with full read and write access.
Most people connect an AI to Google Workspace one service at a time, and each connector covers a narrow slice. The official ones are genuinely limited: users discover mid workflow that they can read email but not send it, see calendar events but not create them. The command line route removes those walls. We run our entire business this way.
What this actually unlocks
The point is not that Claude can check your calendar. It is that your whole Google Workspace becomes something Claude can do real work in:
Your Drive becomes analyzable. Point it at a folder and ask what is in there, what is outdated, which contracts are missing signatures, or have it read fifty PDFs and build you a summary table.
Go through the client folder in my Drive and list every proposal we sent this year, with the amount quoted and whether it was accepted.
You have a data analyst at your call. Not just reading cells: real data work, across sheets, including heavy and complicated work, with all the reasoning explained.
Open the revenue sheet, break out monthly totals by service line, flag anything that dropped more than 20% month over month, and add a summary tab.
Your inbox becomes searchable intelligence. Whole inbox questions, not one email at a time.
Read every email from this client over the last six months and give me a timeline of what we committed to and when.
Go through my unread mail, tell me what actually needs a reply today, and draft the replies for my review.
And it can send and automate, not just read. Claude can send email through your account, and it can build automations around your mail. Imagine this: an automation that watches your inbox for receipts and invoices, extracts the vendor, amount and date from each one, and logs them into your accounting sheet or accounting software. All done just through prompting Claude. That is hours of monthly admin that simply stops existing. Same pattern for any trigger: a booking confirmation that becomes a calendar event and a prep doc, a lead email that becomes a CRM row and a drafted response.
The compounding effect comes from combination. One request can read a spreadsheet, check a calendar, search your email for context and produce a document, because it is all one authenticated session instead of four disconnected connectors.
The setup
The tool is gws, the Google Workspace CLI, published at github.com/googleworkspace/cli. Because it is a command line tool, Claude Code calls it directly, and the output is clean JSON that Claude can filter, join and act on.
Four steps:
1. A dedicated Google Cloud project. Keep it separate from anything else, so the credential's blast radius stays small.
2. Enable the APIs you want: Gmail, Drive, Docs, Sheets, Calendar, Tasks, Slides. One failure mode worth naming, because it wastes real time: an API that is not enabled fails at the first call with a 403, and tools usually surface that as something vague like an expired connection. If a freshly authenticated tool cannot read anything, check the enabled API list before debugging anything else.
3. Create an OAuth client of type Desktop app and download the JSON.
4. Authenticate once with gws auth login. Credentials are encrypted in the operating system keyring, and a refresh token means you do not log in again. gws auth status shows the account, scopes and token validity, and it is the first thing to run when anything misbehaves.
One distinction that trips people up: enabled APIs and granted scopes are separate systems. The project decides which APIs exist, the token decides what your session may touch. A permission error with the API clearly enabled means a missing scope, and the fix is re-consenting, not more console settings.
To be clear about what you are doing here: this token can read and send your mail. Be deliberate about it, the same way you would with any integration that touches the systems your business runs on. Things can go wrong when an AI has live access to real accounts, and the failure stories are worth reading before you build: here is one, and here is the deeper security argument about why an assistant that reads untrusted content deserves guardrails. Read them, then build accordingly.
Why this beats stacking MCP connectors
A common alternative is loading up Claude with a dozen MCP servers. The problem, as one Claude Code user put it: "most MCPs I only need 5% of the time, but they eat my context window 100% of the time." One documented setup burned 82,000 tokens on server definitions before doing any work. The CLI approach costs nothing until the moment Claude actually runs a command, covers more of Google Workspace than any connector does, and gives you one place to audit and revoke access.
Questions, answered
Can Claude actually send email, or only read it?
Through the Google Workspace CLI, it can send, with your approval in the loop. This is a real difference from the stock connectors, which are read-mostly.
Is it safe to give an AI access to my email?
Treat it with the same care as any integration that has write access to the systems your business runs on. The failure stories are real: one user asked Claude Code to clean up a project and it deleted his entire repository, plus files on his desktop. Read stories like that before you build, and implement this at your own risk. Worth adding that incidents like these largely involve older models, and up to date ones like Opus 5 and Fable 5 are extremely unlikely to do anything of the sort. Careful setup is still the right default.
Do I need a Google Cloud project?
Yes, a small one, once. It holds the OAuth client and the API switches. Ten minutes, and Claude Code can walk you through every step of it.
Does this work with multiple Google accounts?
Yes, though give each account its own OAuth client. Reusing one client across accounts is the classic mistake: authenticating the second silently invalidates the first.
Want this set up without doing any of it yourself?
This is the kind of system we build for businesses. Reach out and tell us what you want off your plate.