gmail-automation by composiohq/awesome-claude-skills
npx skills add https://github.com/composiohq/awesome-claude-skills --skill gmail-automation通过 Composio 的 Gmail 工具包和 Rube MCP 自动化 Gmail 操作。
工具包文档 : composio.dev/toolkits/gmail
RUBE_SEARCH_TOOLS 可用)RUBE_MANAGE_CONNECTIONS 与工具包 gmail 建立活跃的 Gmail 连接RUBE_SEARCH_TOOLS 以获取当前工具模式获取 Rube MCP : 在您的客户端配置中将 https://rube.app/mcp 添加为 MCP 服务器。无需 API 密钥——只需添加端点即可工作。
RUBE_SEARCH_TOOLS 有响应来验证 Rube MCP 是否可用广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
gmailRUBE_MANAGE_CONNECTIONS使用场景 : 用户想要撰写并发送新邮件
工具调用顺序 :
GMAIL_SEARCH_PEOPLE - 将联系人姓名解析为电子邮件地址 [可选]GMAIL_SEND_EMAIL - 发送电子邮件 [必需]关键参数 :
recipient_email: 收件人电子邮件地址或 'me' 表示自己subject: 邮件主题行body: 邮件内容(纯文本或 HTML)is_html: 如果正文包含 HTML 标记,必须设为 truecc/bcc: 电子邮件地址数组attachment: 包含先前下载的 {s3key, mimetype, name} 的对象注意事项 :
recipient_email、cc 或 bcc 中至少需要一个subject 或 body 中至少需要一个mimetype 必须包含 '/'(例如 'application/pdf',而不是 'pdf')from_email使用场景 : 用户想要回复现有的电子邮件对话
工具调用顺序 :
GMAIL_FETCH_EMAILS - 查找要回复的邮件/线程 [前提条件]GMAIL_REPLY_TO_THREAD - 在线程内发送回复 [必需]关键参数 :
thread_id: 来自 FETCH_EMAILS 的十六进制字符串(例如 '169eefc8138e68ca')message_body: 回复内容recipient_email: 回复收件人is_html: 对于 HTML 内容设为 true注意事项 :
thread_id 必须是十六进制字符串;像 'msg-f:' 这样的前缀会被自动去除使用场景 : 用户想要按发件人、主题、日期、标签等查找特定邮件
工具调用顺序 :
GMAIL_FETCH_EMAILS - 使用 Gmail 查询语法进行搜索 [必需]GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID - 获取选定结果的完整消息详情 [可选]关键参数 :
query: Gmail 搜索语法(from:, to:, subject:, is:unread, has:attachment, after:YYYY/MM/DD, before:YYYY/MM/DD)max_results: 每页 1-500 条消息label_ids: 系统 ID,如 'INBOX'、'UNREAD'include_payload: 设为 true 以获取完整消息内容ids_only: 设为 true 仅获取消息 IDpage_token: 用于分页(来自 nextPageToken)注意事项 :
page_token 跟随 nextPageToken 直到其不存在resultSizeEstimate 是近似值,不是精确计数include_payload=true 会产生巨大响应;默认为元数据使用场景 : 用户想要创建、修改或组织标签
工具调用顺序 :
GMAIL_LIST_LABELS - 列出所有标签以查找 ID 并检测冲突 [必需]GMAIL_CREATE_LABEL - 创建新标签 [可选]GMAIL_PATCH_LABEL - 重命名或更改标签颜色/可见性 [可选]GMAIL_DELETE_LABEL - 删除用户创建的标签(不可逆) [可选]关键参数 :
label_name: 最多 225 个字符,无逗号,'/' 用于嵌套(例如 'Work/Projects')background_color/text_color: 来自 Gmail 预定义调色板的十六进制值id: 用于 PATCH/DELETE 操作的标签 ID注意事项 :
使用场景 : 用户想要标记、归档或将邮件标记为已读/未读
工具调用顺序 :
GMAIL_LIST_LABELS - 获取自定义标签的标签 ID [前提条件]GMAIL_FETCH_EMAILS - 查找目标消息 [前提条件]GMAIL_BATCH_MODIFY_MESSAGES - 批量添加/移除标签(最多 1000 条消息) [必需]GMAIL_ADD_LABEL_TO_EMAIL - 单条消息的标签更改 [备用方案]关键参数 :
messageIds: 消息 ID 数组(最多 1000 个)addLabelIds: 要添加的标签 ID 数组removeLabelIds: 要移除的标签 ID 数组message_id: 用于单个操作的 15-16 字符十六进制字符串注意事项 :
message_id 必须是 15-16 字符的十六进制字符串,而不是 UUID 或网页界面 ID使用场景 : 用户想要创建、编辑或发送电子邮件草稿,可能包含附件
工具调用顺序 :
GMAIL_CREATE_EMAIL_DRAFT - 创建新草稿 [必需]GMAIL_UPDATE_DRAFT - 编辑草稿内容 [可选]GMAIL_LIST_DRAFTS - 列出现有草稿 [可选]GMAIL_SEND_DRAFT - 发送草稿(需要明确的用户批准) [可选]GMAIL_GET_ATTACHMENT - 从现有消息下载附件 [可选]关键参数 :
recipient_email: 草稿收件人subject: 草稿主题(对于回复草稿,省略以保持在原线程中)body: 草稿内容is_html: 对于 HTML 内容设为 trueattachment: 包含 {s3key, mimetype, name} 的对象thread_id: 用于回复草稿(留空主题以保持在原线程中)注意事项 :
data.id(draft_id)和 data.message.id;使用 data.id 进行草稿操作标签名称 → 标签 ID :
1. 调用 GMAIL_LIST_LABELS
2. 在响应中按名称查找标签
3. 提取 id 字段(例如 'Label_123')
联系人姓名 → 电子邮件 :
1. 使用 query=contact_name 调用 GMAIL_SEARCH_PEOPLE
2. 从响应中提取 emailAddresses
从搜索中获取线程 ID :
1. 调用 GMAIL_FETCH_EMAILS 或 GMAIL_LIST_THREADS
2. 提取 threadId(15-16 字符十六进制字符串)
max_results 最多 500 条nextPageTokenpage_token 传递nextPageToken 不存在或为空字符串resultSizeEstimate 是近似值,不是精确值操作符 :
from:sender@example.com - 来自发件人的邮件to:recipient@example.com - 发送给收件人的邮件subject:"exact phrase" - 主题包含确切短语is:unread - 未读消息is:starred - 已加星标的消息is:snoozed - 已暂停的消息has:attachment - 有附件after:2024/01/01 - 日期之后(YYYY/MM/DD)before:2024/12/31 - 日期之前label:custom_label - 用户创建的标签(使用标签 ID)in:sent - 在已发送文件夹中category:primary - 主要类别组合符 :
AND - 两个条件都满足(默认)OR - 任一条件满足NOT - 排除条件() - 分组条件示例 :
from:boss@company.com is:unread - 来自老板的未读邮件subject:invoice has:attachment after:2024/01/01 - 今年带附件的发票邮件(from:alice OR from:bob) is:starred - 来自 Alice 或 Bob 的已加星标邮件ID 格式 :
查询语法 :
速率限制 :
响应解析 :
data_preview 或 data.messages 下messageTimestamp 使用带 'Z' 后缀的 RFC3339 格式附件 :
s3key 可能会过期| 任务 | 工具标识 | 关键参数 |
|---|---|---|
| 发送邮件 | GMAIL_SEND_EMAIL | recipient_email, subject, body, is_html |
| 回复线程 | GMAIL_REPLY_TO_THREAD | thread_id, message_body, recipient_email |
| 搜索邮件 | GMAIL_FETCH_EMAILS | query, max_results, label_ids, page_token |
| 获取消息详情 | GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID | message_id |
| 列出标签 | GMAIL_LIST_LABELS | (none) |
| 创建标签 | GMAIL_CREATE_LABEL | label_name, background_color, text_color |
| 批量修改标签 | GMAIL_BATCH_MODIFY_MESSAGES | messageIds, addLabelIds, removeLabelIds |
| 创建草稿 | GMAIL_CREATE_EMAIL_DRAFT | recipient_email, subject, body, thread_id |
| 发送草稿 | GMAIL_SEND_DRAFT | draft_id |
| 获取附件 | GMAIL_GET_ATTACHMENT | message_id, attachment_id |
| 搜索联系人 | GMAIL_SEARCH_PEOPLE | query |
| 获取个人资料 | GMAIL_GET_PROFILE | (none) |
由Composio提供支持
每周安装次数
173
代码仓库
GitHub 星标数
47.0K
首次出现
2026年2月6日
安全审计
安装于
opencode117
claude-code112
gemini-cli107
openclaw102
codex94
antigravity79
Automate Gmail operations through Composio's Gmail toolkit via Rube MCP.
Toolkit docs : composio.dev/toolkits/gmail
RUBE_MANAGE_CONNECTIONS with toolkit gmailRUBE_SEARCH_TOOLS first to get current tool schemasGet Rube MCP : Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit gmailWhen to use : User wants to compose and send a new email
Tool sequence :
GMAIL_SEARCH_PEOPLE - Resolve contact name to email address [Optional]GMAIL_SEND_EMAIL - Send the email [Required]Key parameters :
recipient_email: Email address or 'me' for selfsubject: Email subject linebody: Email content (plain text or HTML)is_html: Must be true if body contains HTML markupcc/bcc: Arrays of email addressesattachment: Object with {s3key, mimetype, name} from prior downloadPitfalls :
recipient_email, cc, or bcc requiredsubject or body requiredmimetype MUST contain '/' (e.g., 'application/pdf', not 'pdf')from_email only for verified aliases in Gmail 'Send mail as' settingsWhen to use : User wants to reply to an existing email conversation
Tool sequence :
GMAIL_FETCH_EMAILS - Find the email/thread to reply to [Prerequisite]GMAIL_REPLY_TO_THREAD - Send reply within the thread [Required]Key parameters :
thread_id: Hex string from FETCH_EMAILS (e.g., '169eefc8138e68ca')message_body: Reply contentrecipient_email: Reply recipientis_html: Set true for HTML contentPitfalls :
thread_id must be hex string; prefixes like 'msg-f:' are auto-strippedWhen to use : User wants to find specific emails by sender, subject, date, label, etc.
Tool sequence :
GMAIL_FETCH_EMAILS - Search with Gmail query syntax [Required]GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID - Get full message details for selected results [Optional]Key parameters :
query: Gmail search syntax (from:, to:, subject:, is:unread, has:attachment, after:YYYY/MM/DD, before:YYYY/MM/DD)max_results: 1-500 messages per pagelabel_ids: System IDs like 'INBOX', 'UNREAD'include_payload: Set true to get full message contentids_only: Set true for just message IDspage_token: For pagination (from nextPageToken)Pitfalls :
nextPageToken via page_token until absentresultSizeEstimate is approximate, not exact countinclude_payload=true on broad searches creates huge responses; default to metadataWhen to use : User wants to create, modify, or organize labels
Tool sequence :
GMAIL_LIST_LABELS - List all labels to find IDs and detect conflicts [Required]GMAIL_CREATE_LABEL - Create a new label [Optional]GMAIL_PATCH_LABEL - Rename or change label colors/visibility [Optional]GMAIL_DELETE_LABEL - Delete a user-created label (irreversible) [Optional]Key parameters :
label_name: Max 225 chars, no commas, '/' for nesting (e.g., 'Work/Projects')background_color/text_color: Hex values from Gmail's predefined paletteid: Label ID for PATCH/DELETE operationsPitfalls :
When to use : User wants to label, archive, or mark emails as read/unread
Tool sequence :
GMAIL_LIST_LABELS - Get label IDs for custom labels [Prerequisite]GMAIL_FETCH_EMAILS - Find target messages [Prerequisite]GMAIL_BATCH_MODIFY_MESSAGES - Bulk add/remove labels (up to 1000 messages) [Required]GMAIL_ADD_LABEL_TO_EMAIL - Single-message label changes [Fallback]Key parameters :
messageIds: Array of message IDs (max 1000)addLabelIds: Array of label IDs to addremoveLabelIds: Array of label IDs to removemessage_id: 15-16 char hex string for single operationsPitfalls :
message_id must be 15-16 char hex, NOT UUIDs or web UI IDsWhen to use : User wants to create, edit, or send email drafts, possibly with attachments
Tool sequence :
GMAIL_CREATE_EMAIL_DRAFT - Create a new draft [Required]GMAIL_UPDATE_DRAFT - Edit draft content [Optional]GMAIL_LIST_DRAFTS - List existing drafts [Optional]GMAIL_SEND_DRAFT - Send a draft (requires explicit user approval) [Optional]GMAIL_GET_ATTACHMENT - Download attachment from existing message [Optional]Key parameters :
recipient_email: Draft recipientsubject: Draft subject (omit for reply drafts to stay in thread)body: Draft contentis_html: Set true for HTML contentattachment: Object with {s3key, mimetype, name}thread_id: For reply drafts (leave subject empty to stay in thread)Pitfalls :
data.id (draft_id) AND data.message.id; use data.id for draft operationsLabel name → Label ID :
1. Call GMAIL_LIST_LABELS
2. Find label by name in response
3. Extract id field (e.g., 'Label_123')
Contact name → Email :
1. Call GMAIL_SEARCH_PEOPLE with query=contact_name
2. Extract emailAddresses from response
Thread ID from search :
1. Call GMAIL_FETCH_EMAILS or GMAIL_LIST_THREADS
2. Extract threadId (15-16 char hex string)
max_results up to 500 per pagenextPageTokenpage_token in next requestnextPageToken is absent or empty stringresultSizeEstimate is approximate, not exactOperators :
from:sender@example.com - Emails from senderto:recipient@example.com - Emails to recipientsubject:"exact phrase" - Subject contains exact phraseis:unread - Unread messagesis:starred - Starred messagesis:snoozed - Snoozed messageshas:attachment - Has attachmentsafter:2024/01/01 - After date (YYYY/MM/DD)before:2024/12/31 - Before dateCombinators :
AND - Both conditions (default)OR - Either conditionNOT - Exclude condition() - Group conditionsExamples :
from:boss@company.com is:unread - Unread emails from bosssubject:invoice has:attachment after:2024/01/01 - Invoices with attachments this year(from:alice OR from:bob) is:starred - Starred emails from Alice or BobID Formats :
Query Syntax :
Rate Limits :
Response Parsing :
data_preview or data.messagesmessageTimestamp uses RFC3339 with 'Z' suffixAttachments :
s3key from prior download may expire| Task | Tool Slug | Key Params |
|---|---|---|
| Send email | GMAIL_SEND_EMAIL | recipient_email, subject, body, is_html |
| Reply to thread | GMAIL_REPLY_TO_THREAD | thread_id, message_body, recipient_email |
| Search emails | GMAIL_FETCH_EMAILS | query, max_results, label_ids, page_token |
| Get message details | GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID | message_id |
| List labels | GMAIL_LIST_LABELS | (none) |
| Create label | GMAIL_CREATE_LABEL | label_name, background_color, text_color |
| Modify labels bulk | GMAIL_BATCH_MODIFY_MESSAGES | messageIds, addLabelIds, removeLabelIds |
| Create draft | GMAIL_CREATE_EMAIL_DRAFT | recipient_email, subject, body, thread_id |
| Send draft | GMAIL_SEND_DRAFT |
Powered byComposio
Weekly Installs
173
Repository
GitHub Stars
47.0K
First Seen
Feb 6, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode117
claude-code112
gemini-cli107
openclaw102
codex94
antigravity79
Azure RBAC 权限管理工具:查找最小角色、创建自定义角色与自动化分配
123,100 周安装
label:custom_labelin:sent - In sent foldercategory:primary - Primary category| draft_id |
| Get attachment | GMAIL_GET_ATTACHMENT | message_id, attachment_id |
| Search contacts | GMAIL_SEARCH_PEOPLE | query |
| Get profile | GMAIL_GET_PROFILE | (none) |