skill-gmail-api
Gmail API skill for email operations via CLI. Supports reading, drafting, sending, archiving, labeling, and batch operations.Use when user needs to: read emails, create/send drafts, reply to messages, archive/trash messages, manage labels, or perform bulk email operations.
When & Why to Use This Skill
This Claude skill provides a comprehensive Gmail API integration for streamlined email management via CLI or AI-driven automation. It enables users to perform essential operations such as reading, drafting, sending, and archiving messages, while also supporting advanced batch processing and label management. By bridging the gap between the Gmail ecosystem and command-line workflows, it significantly enhances productivity for developers and power users who need to automate communication tasks or manage high volumes of email efficiently.
Use Cases
- Automated Inbox Cleanup: Use batch operations to archive old newsletters or mark specific notification emails as read based on custom search queries.
- AI-Powered Drafting and Replies: Leverage the agent to compose professional drafts or reply to existing threads, saving time on routine correspondence.
- Efficient Email Retrieval: Quickly search and read specific messages using the 'read' and 'get' commands without needing to open a web browser.
- Bulk Labeling and Organization: Organize a cluttered inbox by applying labels or moving large sets of messages to the trash or archive in a single operation.
- Workflow Integration: Incorporate email sending and drafting capabilities into larger automated scripts or developer workflows for status reporting and notifications.
| name | skill-gmail-api |
|---|---|
| description | | |
| Use when user needs to | read emails, create/send drafts, reply to messages, archive/trash messages, manage labels, or perform bulk email operations. |
Gmail API Skill
Quick Reference
# Read
scripts/gmail.py read --limit 10
scripts/gmail.py read --query "is:unread" --full
scripts/gmail.py get --id MSG_ID
# Draft & Send
scripts/gmail.py draft --to "x@y.com" --subject "Hi" --body "Hello"
scripts/gmail.py draft --reply-to MSG_ID --body "Thanks!"
scripts/gmail.py send --draft-id DRAFT_ID
scripts/gmail.py send --to "x@y.com" --subject "Hi" --body "Hello"
# Manage
scripts/gmail.py archive --id MSG_ID
scripts/gmail.py trash --id MSG_ID
scripts/gmail.py star --id MSG_ID
scripts/gmail.py mark-read --id MSG_ID
# Batch
scripts/gmail.py batch-archive --query "from:newsletters@"
scripts/gmail.py batch-mark-read --query "is:unread from:notifications@"
Run scripts/gmail.py --help or scripts/gmail.py COMMAND --help for options.
Full command reference: See references/commands.md
Setup
- Create OAuth credentials at Google Cloud Console
- Copy
credentials.example.jsontocredentials.jsonand add your client_id/secret - First run opens browser for OAuth consent