Most OpenClaw users operate in a completely separate context from their actual work tools. Their agent doesn't know about tomorrow's meeting, hasn't seen their email, and has no idea what's in their Drive. That's a significant limitation — and it's fixable.
Google Workspace integration changes this. Your agent can check your calendar before suggesting meeting times, draft email replies in your voice, search Drive for relevant documents, and prep briefings that include what's actually on your plate today.
Here's the full setup — and the honest limits of what each integration can do.
How OpenClaw Connects to Google
OpenClaw uses OAuth 2.0 to connect to Google APIs — the same authentication standard Gmail and other apps use. You authorize specific scopes (read calendar, send email, etc.) through Google's standard consent flow. No passwords are shared; you can revoke access at any time.
The connection lives in your OpenClaw MCP (Model Context Protocol) tools configuration. Each Google service is a separate tool that your agent can call when needed.
Security first: Only grant the scopes you actually need. Read-only access to Calendar is safer than full Calendar + Gmail send. Start minimal and expand. Your agent can be prompted to never send email without your explicit approval — enforce this in your SOUL.md.
Setting Up Google OAuth
- Go to Google Cloud Console and create a new project (or use an existing one)
- Enable the APIs you need: Google Calendar API, Gmail API, Google Drive API — enable only what you'll use
- Go to APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID
- Choose Desktop application as the application type
- Download the credentials JSON file — save it somewhere safe (not in your git-tracked workspace)
- Configure the Google MCP tool in OpenClaw with your credentials path and desired scopes
- On first use, OpenClaw will open a browser window for you to authorize — sign in and approve the scopes
- A refresh token is saved locally — future sessions use this automatically
One-time setup. Once authorized, the connection persists until you revoke it. The refresh token lives in your OpenClaw credentials directory (~/.openclaw/credentials/) — back this up and don't commit it to git.
Google Calendar Integration
What Your Agent Can Do
- Check your schedule before suggesting meeting times ("I'm free Thursday 2–4 PM")
- Create calendar events with title, time, attendees, location, and description
- Find conflicts when scheduling ("You have a call at 3 PM that day")
- List upcoming events in your morning briefing
- Set reminders and follow-up tasks tied to specific events
- Detect and flag scheduling gaps or back-to-back days that need buffer time
Recommended Scopes
| Scope | Access Level | Use Case |
|---|---|---|
| calendar.readonly | Read only | Briefings, conflict detection, schedule awareness |
| calendar.events | Read + write events | Creating and modifying events |
| calendar | Full access | Everything — only if needed |
Practical tip: Start with calendar.readonly. The awareness use case (morning briefing includes today's schedule) is immediately valuable and carries zero risk of accidental event creation or deletion.
Gmail Integration
What Your Agent Can Do
- Search your inbox for emails matching a topic, sender, or date range
- Summarize a thread or extract key action items from a long email chain
- Draft replies in your writing style — you review and send
- Flag emails that have been sitting unanswered for X days
- Identify emails that need action vs. FYI vs. can-be-archived
- Send emails on your behalf (requires explicit approval flow you configure)
Recommended Scopes
| Scope | Access Level | Use Case |
|---|---|---|
| gmail.readonly | Read only | Summarizing, searching, action flagging |
| gmail.compose | Compose + send | Drafting and sending (no read access) |
| gmail.modify | Read + label + archive | Inbox management |
| gmail | Full access | Everything — use cautiously |
Important: Before giving your agent Gmail send access, add an explicit rule to your SOUL.md: "Never send an email without showing me the draft and receiving my explicit 'send it' approval. Drafting is automatic; sending always requires my confirmation." This prevents accidental sends.
Google Drive Integration
What Your Agent Can Do
- Search Drive for documents by name, content keywords, or date
- Read the contents of Google Docs (for summarizing, extracting data, or referencing)
- List files in a specific folder
- Create new Google Docs from drafts your agent generates
- Update existing Docs (e.g., appending meeting notes to a running document)
- Share files and set permissions (with your approval)
Recommended Scopes
| Scope | Access Level | Use Case |
|---|---|---|
| drive.readonly | Read only | Searching, reading, summarizing documents |
| drive.file | Files created by app only | Creating new docs without access to existing files |
| drive | Full access | Read + write + delete all files |
Practical Workflows Once Connected
The "Morning Briefing" workflow
Your heartbeat agent runs at 6:30 AM, checks Calendar for the day's events, scans Gmail for unread flagged emails, and compiles a briefing: "You have 3 meetings today starting at 10 AM. 2 emails need responses — I've drafted replies for both. Your 2 PM has a conflict with your contractor call — want me to reschedule one?"
The "Meeting prep" workflow
30 minutes before a calendar event, your agent searches Gmail and Drive for recent communication with the attendees, pulls relevant documents, and sends you a one-page brief: who's coming, what was discussed last time, open action items, relevant files.
The "Email triage" workflow
You message your agent: "What's sitting in my inbox that needs action?" It searches Gmail, categorizes by urgency, summarizes each thread in one sentence, and drafts replies for the ones you want to respond to. You review, approve, send.
The "Follow-up tracker" workflow
You tell your agent about an important email you sent. It monitors your Gmail for a reply and pings you if no response comes in X days — with a drafted follow-up ready to send.
The pattern: OpenClaw + Google Workspace works best when you treat your agent as a chief of staff who has read-access to your work tools and brings you a prepared briefing rather than forcing you to dig through everything yourself. Read-heavy, draft-heavy, action-light until you've tested it thoroughly.
Common Setup Problems
- "OAuth consent screen in testing mode" — If you created a personal Cloud project, your OAuth app will show a warning. Add your own email as a test user in the consent screen settings to bypass this.
- Refresh token expires — Google invalidates refresh tokens after 7 days if the app hasn't been verified. Re-authorize when this happens. For personal use, this is just a minor annoyance.
- Agent reads too much email — Set scope limits in your config and use targeted search queries (
is:unread after:2026/03/25) rather than open-ended inbox reads. Token cost adds up fast on large inboxes. - Drive search misses files — Drive full-text search only covers Docs/Sheets/Slides natively. PDFs and other uploads need to be converted to Google Docs format for content search to work.
🦞 Want Google Workspace Connected Properly?
OAuth setup, scope configuration, SOUL.md guardrails for email send, and the morning briefing workflow — ClawReady sets all of this up as part of our full setup package. Book a call and we'll get your agent reading your calendar by tomorrow.
Book a Free 15-Min Call →