Tomide Williams
All projects

AI Operations Agents

Google Workspace CLI Integration

A custom CLI that gives Claude Code full, direct control over Gmail, Docs, Sheets, Calendar, Drive, and Slides, no browser required.

Client Tomide Williams (personal system)

01The brief

The problem

I needed Claude Code to actually do things in Google Workspace: draft and send emails, build out Sheets, create Docs, manage my calendar, not just describe what I should go click on.

Google doesn't ship that kind of integration out of the box. Getting it right meant building a real bridge between Claude Code and the Workspace APIs, properly authenticated, that could be trusted with live data.

The scope was broad on purpose: Gmail, Calendar, Docs, Sheets, Drive, Slides, and Tasks all needed to be reachable, because splitting the work across a partial integration would have just moved the switching problem somewhere else.

Some of the harder operations, formatted Sheets, HTML-to-Google-Doc conversion, kept breaking through plain CLI flags, which meant finding a more direct, reliable pattern before this could be trusted for real work.

Tomide Williams (personal system)

02Implementation plan

From brief to build

How we turned the client's challenge into a system their team actually uses.

01

Build the CLI bridge

Built a command-line tool that talks directly to the Google Workspace APIs, so Claude Code can call it like any other terminal command.

02

Authenticate it properly

Set up OAuth against a dedicated Google Cloud project with the full scope list, Gmail, Calendar, Docs, Sheets, Drive, Slides, Tasks, and more, so every call is authorized and auditable.

03

Solve the tricky parts

Worked out the reliable pattern for complex API calls, like formatted Sheets or HTML-to-Google-Doc conversion, that plain CLI flags kept mangling, using direct REST calls with the OAuth token instead.

04

Put it to real use

Now runs day to day: pulling and replying to email, building and formatting Sheets, converting documents for Drive delivery, and managing calendar events, all from inside a Claude Code session.

03Before & After

What changed

Before

  • Getting anything done in Google Workspace meant switching out of Claude Code and into a browser, every single time.
  • There was no way for an AI assistant to actually act on Gmail, Docs, Sheets, or Calendar, only to describe what to do next.
  • Repetitive tasks, drafting a doc, formatting a sheet, checking a calendar, still needed a human to execute every step.

After

  • Claude Code now reads and writes directly into Gmail, Docs, Sheets, Calendar, Drive, and Slides from the command line.
  • Complex operations, like fully formatted Sheets or Doc conversions, run reliably through a proven, direct API pattern.
  • Workspace tasks that used to require switching tools now finish inside the same session as everything else.

04Why this approach

An AI assistant that can only suggest actions in Google Workspace is only half useful. Someone still has to go and do the work by hand.

Building a proper authenticated CLI bridge meant Claude Code could execute directly against real Workspace data, closing the gap between being told what to do and it already being done.

Solving the harder API cases up front, rather than working around them each time, meant the integration could actually be relied on for daily work, not just simple lookups.

05Impact & benefits

Full, direct control over Gmail, Docs, Sheets, Calendar, Drive, and Slides from inside a single Claude Code session, no browser switching required.

Workspace scopes connected

27

APIs enabled

40+

Browser switching for Workspace tasks

Eliminated

Direct execution on Gmail, Docs, Sheets, Calendar, and Drive, not just suggestions.

A proven pattern for the complex API calls that usually break in a CLI.

Workspace tasks finish inside the same session as everything else.

No more switching out of Claude Code just to open a browser tab.

Trusted enough for daily use across email, documents, and scheduling.

06Business outcomes

Business outcomes

A custom CLI bridging Claude Code to the full Google Workspace API set.

Reliable handling of complex operations like formatted Sheets and Doc conversion.

27 authenticated scopes covering Gmail, Docs, Sheets, Calendar, Drive, and more.

Runs entirely from the command line, no browser required.

Built on a dedicated, properly authorized Google Cloud project.

Extendable to any additional Workspace API as new needs come up.

07Built with

Tools & capabilities

Claude CodeGoogle WorkspaceGoogle Cloud

Next project

GHL + Stripe Payment Automation