- The OpenClaw Google Workspace skill covers Gmail, Calendar, Drive, Docs, and Sheets — all configured through a single OAuth credential set
- Install with
openclaw plugins install google-workspaceand point the skill at your Google Cloud OAuth JSON file - Each Workspace service is a sub-skill — enable only the ones your agent actually needs to minimize your OAuth scope footprint
- The most powerful setups chain services: an email trigger reads Gmail, logs to Sheets, creates a Calendar event, and drafts a Docs summary — all in one agent run
- As of early 2025, the Workspace skill uses OAuth 2.0 with offline access — your token refreshes automatically without re-authentication
Connecting OpenClaw to Google Workspace unlocks the kind of automation most teams spend thousands on with Zapier or Make. Your AI agent reads emails, schedules meetings, updates spreadsheets, and writes documents — without a human in the loop. This guide covers the full setup, every sub-skill, and the exact workflows that justify the 20-minute install time.
Why Connecting the Full Suite Changes Everything
Single-service integrations are fine for simple triggers. You connect Gmail, your agent reads new emails, done. But the real productivity gain comes when your agent can move context across services without you orchestrating it manually.
Think about what a skilled executive assistant does. They don't just read your email. They read it, check your calendar, update the project tracker, draft a response, and file the thread. That's four tools, one task. Your OpenClaw agent can do the same thing — but only if all four services are connected.
Here's what we've seen consistently: teams that connect two or more Workspace services see 3x the automation coverage of teams that connect just one. The compound effect of chained actions is where the value actually lives.
If you're new to the Workspace skill, start by connecting Gmail only. Get one automated workflow running end-to-end. Then add Calendar, Drive, and Sheets incrementally. This approach lets you validate auth works before you're debugging five services at once.
Installation and OAuth Authentication
Before installing the plugin, you need a Google Cloud project with the relevant APIs enabled. This is a one-time setup that takes about 10 minutes.
Step 1: Create a Google Cloud project and enable APIs
Go to console.cloud.google.com, create a new project (or use an existing one), and enable these APIs for the services you want to use:
- Gmail API
- Google Calendar API
- Google Drive API
- Google Docs API
- Google Sheets API
Step 2: Create OAuth 2.0 credentials
In your Cloud project, go to APIs & Services → Credentials → Create Credentials → OAuth client ID. Choose "Desktop application" as the application type. Download the JSON credentials file — you'll reference this in your OpenClaw config.
Step 3: Install the plugin
openclaw plugins install google-workspace
Step 4: Configure the skill in your agent YAML
skills:
- name: google-workspace
credentials_file: /path/to/oauth-credentials.json
token_store: /path/to/token-store.json
services:
gmail:
enabled: true
default_labels: [INBOX, UNREAD]
calendar:
enabled: true
default_calendar: primary
drive:
enabled: true
docs:
enabled: true
sheets:
enabled: true
On first run, OpenClaw will open a browser window for the OAuth consent flow. After you authorize, the token is stored in token_store and refreshes automatically. You won't need to re-authenticate unless you revoke access or the refresh token expires.
Request only the scopes your agent actually needs. If you only need to read Gmail, request gmail.readonly — not gmail.modify. Overly broad tokens are a security liability and can trigger Google's automated review process for your Cloud project.
Configuring Each Workspace Service
Gmail
The Gmail sub-skill gives your agent four core capabilities: reading messages, searching by query, drafting replies, and sending emails. The most useful capability for automation is search — your agent can filter by sender, subject, label, date range, or any combination.
A common pattern is monitoring a specific label. Create a Gmail filter that applies a custom label to incoming messages that match your criteria. Your OpenClaw agent watches that label and processes each message on arrival. This keeps your agent focused instead of processing every email in your inbox.
Google Calendar
Calendar integration lets your agent check availability, create events, update existing events, and read upcoming schedule. The most practical use case: your agent receives a meeting request via email, checks your calendar for conflicts, and either books the meeting or proposes alternatives — without you touching it.
Google Drive
Drive access means your agent can search for files, read document content, create new files, and move files between folders. Pair this with the Gmail skill and your agent can automatically file email attachments into the correct project folder.
Google Docs and Sheets
These two are where the output lives. Your agent can create new Docs, append content to existing ones, read cell values from Sheets, write new rows, and update specific cells. The Sheets skill is especially powerful for logging — every agent action can write a timestamped row to a tracking spreadsheet automatically.
Real Automation Workflows
Workflow 1: Email-to-Tracker Pipeline
Your agent monitors Gmail for emails with a specific label. When one arrives, it extracts the key information — sender, subject, date, action required — and writes a new row to a Google Sheet. The sheet becomes your team's shared inbox tracker, updated automatically without anyone copying and pasting.
Workflow 2: Meeting Request Handler
A client emails requesting a meeting. Your agent reads the email, checks Google Calendar for your availability in the proposed time window, creates a draft reply with available slots, and saves it to your Drafts folder for your review. You click send. That's the only step you take.
Workflow 3: Weekly Report Generator
Every Friday at 4pm, your agent reads the week's entries from a tracking Sheet, pulls any relevant Drive files referenced in those entries, and writes a formatted summary to a new Google Doc. The Doc link gets sent to your Gmail. Your weekly report writes itself.
| Workflow | Services Used | Time Saved/Week |
|---|---|---|
| Email-to-Tracker | Gmail + Sheets | ~2 hours |
| Meeting Request Handler | Gmail + Calendar | ~3 hours |
| Weekly Report Generator | Sheets + Drive + Docs + Gmail | ~4 hours |
| Attachment Filer | Gmail + Drive | ~1.5 hours |
Common Mistakes
- Using a personal Google account for production — personal accounts have tighter API rate limits and no audit logging. Use a Google Workspace (business) account for any serious automation.
- Not storing the token file securely — the token JSON file grants full access to your configured Google services. Store it with restricted file permissions (
chmod 600) and never commit it to source control. - Requesting all scopes at once — start with the minimum scopes you need. Adding scopes later is easy; removing them after a security incident is painful.
- Ignoring API quota limits — Gmail's API has a daily write quota of 250 units per user. Heavy automation (sending hundreds of emails per day) will hit this. Build in retry logic and exponential backoff.
- Not testing with a sandbox account — run your first few workflows against a test Gmail account before pointing your agent at your real inbox. Mistakes in agent-generated emails are hard to walk back.
Frequently Asked Questions
What Google Workspace apps does OpenClaw support?
OpenClaw's Google Workspace skill covers Gmail, Google Calendar, Google Drive, Google Docs, and Google Sheets. Each service is a configurable sub-skill. Enable them individually based on what your agent workflow needs — you don't have to activate all five.
Do I need a Google Cloud project to connect OpenClaw to Workspace?
Yes. A Google Cloud project with the relevant APIs enabled and OAuth 2.0 credentials is required. The skill uses those credentials to authenticate on your behalf. Setup takes about 10 minutes following the steps in this guide — it's a one-time process.
Can OpenClaw read and send Gmail emails automatically?
Yes. With the Gmail sub-skill configured, your agent reads unread messages, searches by label or sender, drafts replies, and sends emails. You define the trigger conditions — the agent handles execution without further input once configured correctly.
Is the Google Workspace skill free to use with OpenClaw?
The OpenClaw plugin is free. Google Workspace API usage falls under Google's quota system, which is generous for most automation. Heavy Gmail automation — thousands of emails daily — may eventually require upgrading your Google Cloud project tier.
How do I limit which Workspace data my OpenClaw agent can access?
Scope your OAuth token to only the APIs your agent needs. In Google Cloud, request only specific OAuth scopes. Avoid broad permissions like full drive read-write if your agent only needs to read files. Minimum-privilege scoping is the correct approach.
Can multiple agents share the same Google Workspace credentials?
Yes, but carefully. Shared credentials mean all agents act as the same Google user. For per-agent identity or audit trails, create separate OAuth credentials or service accounts for each agent and configure them individually in each skill block.
T. Chen has built production OpenClaw deployments for teams across SaaS, consulting, and media — connecting Google Workspace, Notion, and custom APIs into agent workflows that replace manual coordination work. Has personally debugged OAuth scoping issues across dozens of Google Cloud projects.