gog
A powerful CLI tool to automate and manage Google Workspace services, including Gmail, Calendar, Drive, Sheets, and Docs.
Introduction
The gog skill provides a robust command-line interface for interacting with the Google Workspace ecosystem. Designed for power users, developers, and automation engineers, it streamlines interactions with Gmail, Google Calendar, Drive, Contacts, Google Sheets, and Google Docs. By enabling programmatic access to these services, users can bypass manual web interfaces to perform complex tasks, batch operations, and system integrations directly from their terminal or within an automated agent workflow.
-
Perform granular Gmail operations including searching threads or individual messages, sending plain text or HTML emails, managing drafts, and handling replies with thread IDs.
-
Manage Google Calendar events with precise scheduling, including creating events, updating event details, setting custom event colors, and querying availability over specific time ranges.
-
Facilitate file operations in Google Drive through advanced search capabilities.
-
Execute data-heavy operations in Google Sheets, such as reading cell ranges in JSON format, performing batch updates, appending new rows, and clearing specific data ranges.
-
Access and export Google Docs content to local files, supporting quick retrieval and document processing workflows.
-
Simplify authentication management using OAuth flows, allowing secure multi-account support for various services.
-
Requires an initial OAuth setup using client credentials and explicit service authorization per account.
-
Prioritize plain text emails for compatibility, using the body-file flag for multi-paragraph content or stdin for piped input.
-
Use the --json and --no-input flags when integrating gog into scripts to ensure output compatibility with standard processing tools.
-
Leverage environment variables like GOG_ACCOUNT to maintain persistent account context, reducing flag repetition in repeated command executions.
-
Note that complex in-place edits for Google Docs require specific API limitations, favoring export/read operations over direct modifications.
-
Ensure all automation tasks include manual confirmation steps or dry-run testing before deploying scripts that send mail or modify calendar events.
Repository Stats
- Stars
- 62
- Forks
- 19
- Open Issues
- 3
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 06:24 PM