gmail
Complete guide to all Gmail tools — inbox management, email sending, labels, search, and threads.
- License 许可
- MIT
- 最近更新
- 2026-10-27
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- gmail
- license
- MIT
- version
- 1.0.0
- metadata
- { "tags": "gmail,email,inbox,google", "author": "Matimo", "apply-to": "gmail-send-email gmail-list-emails gmail-get-email gmail-search-emails gmail-list-labels", "category": "Communication", "difficulty": "beginner" }
- description
- Complete guide to all Gmail tools — inbox management, email sending, labels, search, and threads.
03 SKILL.md 正文
Gmail
Complete guide to using Matimo's Gmail tools for sending emails, inbox management, search, and labels.
All Available Tools
| Tool | Purpose |
|---|---|
gmail-send-email |
Send a new email |
gmail-list-emails |
List emails with optional filters |
gmail-get-email |
Get full details of an email |
gmail-search-emails |
Advanced search with Gmail query syntax |
gmail-list-labels |
List all labels (system + user) |
Authentication
Gmail tools use OAuth2. Required scopes:
https://www.googleapis.com/auth/gmail.readonly— for readinghttps://www.googleapis.com/auth/gmail.send— for sendinghttps://www.googleapis.com/auth/gmail.labels— for labels
Environment variables: GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, GMAIL_REFRESH_TOKEN.
Sending Emails
Use gmail-send-email with:
to(required) — recipient email or comma-separated listsubject(required) — email subjectbody(required) — email body (supports HTML)cc,bcc— optional recipients
Best practices:
- Always include a meaningful subject
- Keep body concise; use HTML for formatting
- Handle bounces — validate addresses before sending
Inbox Management
Listing Emails
Use gmail-list-emails with optional labelIds (e.g., INBOX, UNREAD, STARRED), maxResults, and pageToken.
Getting Email Details
Use gmail-get-email with messageId to retrieve full headers, body, and attachments metadata.
Search
Use gmail-search-emails with Gmail's advanced query syntax:
| Operator | Example | Purpose |
|---|---|---|
from: |
from:alice@acme.com |
From specific sender |
to: |
to:team@acme.com |
Sent to |
subject: |
subject:invoice |
In subject line |
has:attachment |
Has attachments | |
is:unread |
Unread messages | |
is:starred |
Starred messages | |
after: |
after:2024/01/01 |
Date filter |
before: |
before:2024/06/01 |
Date filter |
label: |
label:work |
By label |
filename: |
filename:pdf |
Attachment type |
- |
-from:noreply |
Exclude results |
Combine operators: from:alice has:attachment after:2024/01/01.
Labels
Use gmail-list-labels to retrieve all labels. System labels include INBOX, SENT, TRASH, SPAM, DRAFT, STARRED, UNREAD. User labels are custom.
Common Workflows
Daily Inbox Triage
- List unread emails:
gmail-list-emailswithlabelIds: ["UNREAD"] - Search for priority:
gmail-search-emailswithis:important - Get details on flagged items:
gmail-get-emailfor each
Email Notification
- Send email:
gmail-send-emailwith formatted body - Verify delivery by searching:
gmail-search-emailswithin:sent subject:...
Common Errors
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized |
Invalid or expired token | Refresh OAuth2 token |
403 Insufficient Permission |
Missing scope | Add required Gmail scope |
400 Invalid to header |
Bad email address | Validate email format |
429 Rate limit |
Too many requests | Gmail API: 250 quota units/sec |
04 同仓库更多 Skills
twilio
Complete guide to all Twilio tools — text, media, delivery tracking, E.164 formatting, and message management.
slack
Complete guide to all Slack tools — messaging, channels, users, search, files, reactions, and threads.
postgres
Complete guide to all PostgreSQL tools — parameterized queries, schema navigation, data retrieval, and safe database interaction patterns.
notion
Complete guide to all Notion tools — databases, pages, blocks, queries, and content management.
mailchimp
Complete guide to all Mailchimp tools — campaigns, audiences, lists, templates, segments, and email marketing.
hubspot
Complete guide to all HubSpot CRM tools — contacts, companies, deals, tickets, products, line items, pipelines, and entity management.