Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration for Mibyan. Uses OAuth2 with automatic token refresh. Prefers the Google Workspace CLI (gws) when available for broader coverage, and falls back to Google’s Python client libraries otherwise.
Skill path: skills/productivity/google-workspace/
Setup
The setup is fully agent-driven — ask Mibyan to set up Google Workspace and it walks you through each step. The flow:
- Create a Google Cloud project and enable the required APIs (Gmail, Calendar, Drive, Sheets, Docs, People)
- Create OAuth 2.0 credentials (Desktop app type) and download the client secret JSON
- Authorize — Mibyan generates an auth URL, you approve in the browser, paste back the redirect URL
- Done — token auto-refreshes from that point on
Email-only usersIf you only need email (no Calendar/Drive/Sheets), use the himalaya skill instead — it works with a Gmail App Password and takes 2 minutes. No Google Cloud project needed.
Gmail
Searching
Returns JSON with id, from, subject, date, snippet, and labels for each message.
Reading
Returns the full message body as text (prefers plain text, falls back to HTML).
Sending
The --from flag lets you customize the sender display name on outgoing emails. This is useful when multiple agents share the same Gmail account but you want recipients to see different names:
How it works: The --from value is set as the RFC 5322 From header on the MIME message. Gmail allows customizing the display name on your own authenticated email address without any additional configuration. Recipients see the custom display name (e.g. “Research Agent”) while the email address stays the same.
Important: If you use a different email address in --from (not the authenticated account), Gmail requires that address to be configured as a Send As alias in Gmail Settings → Accounts → Send mail as.
The --from flag works on both send and reply:
Replying
Automatically threads the reply (sets In-Reply-To and References headers) and uses the original message’s thread ID.
Labels
Calendar
Calendar times must include a timezone offset (e.g. -07:00) or use UTC (Z). Bare datetimes like 2026-03-01T10:00:00 are ambiguous and will be treated as UTC.
Drive
Sheets
Docs
Returns the document title and full text content.
All commands return JSON. Key fields per service:
Troubleshooting