OpenClaw Gmail Integration Setup — Connect Gmail & Google Calendar
Clawpedia · For Humans
OpenClaw Gmail integration setup step by step: OAuth credentials, scopes, Google Calendar access, and testing automated email and scheduling workflows.
Overview
Google Calendar and Gmail are among the most requested integrations for OpenClaw. With these connected, your agent can check your schedule, create events, read and summarize emails, draft replies, and automate routine communication. This guide walks you through the complete setup and shows practical use cases.
Prerequisites
A Google account
OpenClaw installed and running
The google-workspace skill (official, verified)
Setting Up Google API Access
Step 1: Create a Google Cloud Project
Go to https://console.cloud.google.com.
Create a new project (e.g., "OpenClaw Integration").
Enable the following APIs:
Google Calendar API
Gmail API
Step 2: Create OAuth 2.0 Credentials
Go to APIs & Services → Credentials.
Click Create Credentials → OAuth Client ID.
Application type: Desktop app (for personal use) or Web application (for server deployment).
Download the credentials.json file.
Step 3: Install and Configure the Skill
# Install the Google Workspace skill
openclaw skills install google-workspace
# Configure with your credentials
openclaw skills config google-workspace --set credentials_path /path/to/credentials.json
# Authenticate (opens browser for OAuth consent)
openclaw skills auth google-workspace
The authentication flow:
A browser window opens.
Sign in with your Google account.
Grant OpenClaw permission to access Calendar and Gmail.
The token is stored securely in ~/.openclaw/tokens/google.json.
Google Calendar Integration
Configuration
skills:
google-workspace:
calendar:
enabled: true
calendar_id: primary # or a specific calendar ID
default_duration: 60 # Default event duration in minutes
reminder_minutes: 15 # Default reminder
timezone: Europe/Berlin
working_hours:
start: "09:00"
end: "18:00"
What You Can Do
Command
Example
Check schedule
"What's on my calendar today?"
Create events
"Schedule a meeting with Sarah tomorrow at 2 PM"
Find free time
"When am I free this week?"
Modify events
"Move my 3 PM meeting to 4 PM"
Cancel events
"Cancel my meeting with John"
Set reminders
"Remind me about the presentation 1 hour before"
Check conflicts
"Am I free next Tuesday at 10 AM?"
Example Interactions
User: "What do I have tomorrow?"
Agent: "Here's your schedule for Tuesday, January 16:
🕘 09:00 – 09:30 Team standup (Zoom)
🕙 10:00 – 11:00 Project review with Sarah
🕐 13:00 – 14:00 Lunch with client (Restaurant Zum Löwen)
🕞 15:30 – 16:00 1:1 with manager
You have 3 free hours: 11:00-13:00 and 14:00-15:30."
User: "Schedule a dentist appointment next Friday at 10 AM"
Agent: "I've created the event:
📅 Dentist Appointment
🗓 Friday, January 19, 10:00 – 11:00
⏰ Reminder: 1 hour before
Note: This conflicts with your 'Sprint Planning' at 10:30.
Should I move the sprint planning?"
Multiple Calendars
skills:
google-workspace:
calendar:
calendars:
- id: primary
name: Work
- id: "abc123@group.calendar.google.com"
name: Personal
- id: "def456@group.calendar.google.com"
name: Family
default_calendar: primary
User: "Add Mom's birthday on March 15 to my family calendar"
Agent: "Added 'Mom's Birthday' to your Family calendar on March 15. Set as all-day event with annual recurrence."
Gmail Integration
Configuration
skills:
google-workspace:
gmail:
enabled: true
max_emails: 20 # Max emails to fetch per request
auto_summarize: true # Summarize long emails
summary_max_words: 50
labels:
- INBOX
- IMPORTANT
exclude_labels:
- SPAM
- PROMOTIONS
What You Can Do
Command
Example
Check inbox
"Do I have any new emails?"
Read emails
"Read the email from Sarah"
Summarize
"Summarize my unread emails"
Search
"Find emails about the project proposal"
Draft replies
"Draft a reply to John's email"
Send emails
"Send an email to sarah@company.com about the meeting"
Manage labels
"Archive all emails from newsletters"
Example Interactions
User: "Summarize my unread emails"
Agent: "You have 7 unread emails:
⚡ High Priority:
1. Sarah Chen — Project deadline moved to Friday
→ Requests confirmation of new timeline
2. IT Department — Password expiry in 3 days
→ Action: Update password before Thursday
📬 Normal:
3. John Miller — Q4 report draft attached
4. Team Slack — Weekly digest (14 messages)
5. AWS — Monthly billing: $142.30
📰 Low Priority:
6. LinkedIn — 3 new connection requests
7. Newsletter — Tech Weekly #147
Want me to draft replies to any of these?"
Email Drafting
User: "Reply to Sarah that the new timeline works for me"
Agent: "Here's my draft reply:
To: sarah.chen@company.com
Subject: Re: Project deadline moved to Friday
Hi Sarah,
Thanks for the update. The new Friday deadline works
for me. I'll have the deliverables ready by Thursday
evening to allow for review.
Best,
[Your name]
Should I send this, or would you like to edit it?"
Security Considerations
Scopes
The skill requests only the minimum necessary permissions:
Scope
Access
Why
calendar.events
Read/write calendar events
Create, modify, view events
gmail.readonly
Read emails
Check and summarize inbox
gmail.send
Send emails
Draft and send replies
gmail.modify
Modify labels
Archive, label management
Token Security
skills:
google-workspace:
security:
token_path: ~/.openclaw/tokens/google.json
encrypt_token: true
require_confirmation:
- send_email # Always confirm before sending
- delete_event # Always confirm before deleting
read_only_mode: false # Set true for read-only access
Tip: Enable require_confirmation for destructive actions. This prevents the agent from sending emails or deleting events without your explicit approval.
Token Refresh
OAuth tokens expire periodically. OpenClaw auto-refreshes them using the refresh token. If refresh fails: