技能 googlesheets-automation
📊

googlesheets-automation

安全

使用 Claude 自动化 Google Sheets

不再需要手动更新电子表格。此技能帮助您通过 Composio 集成,使用 Claude 以编程方式读取、写入、格式化和管理 Google Sheets。

支持: Claude Codex Code(CC)
🥉 74 青铜
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“googlesheets-automation”。 Read the first 10 rows from the 'Customers' sheet in my 'Sales Database' spreadsheet

预期结果:

I found the spreadsheet 'Sales Database' (ID: 1AbC...xYz). Reading rows 1-10 from the 'Customers' sheet (A1:J10). The data contains: 10 rows including headers with columns: Name, Email, Phone, Company, Status, Last Contact. Total customers: 9 active records.

正在使用“googlesheets-automation”。 Add a new customer to the sheet: Jane Doe, jane@example.com, 555-0123, Acme Corp

预期结果:

Successfully appended the new row to 'Customers' sheet. The record was added to row 11. Updated range: Customers!A11:E11. Confirmation: Jane Doe is now in the spreadsheet.

安全审计

安全
v1 • 2/25/2026

All 139 static findings are false positives. The 'external_commands' detections are Markdown code spans (backticks) used for formatting tool names, not shell execution. The 'hardcoded URL' is the official Rube MCP server endpoint in documentation. This is a documentation-only skill with no executable code - it provides instructions for using Google Sheets via the Rube MCP service.

1
已扫描文件
203
分析行数
1
发现项
1
审计总数
低风险问题 (1)
External Service Dependency
Skill requires third-party Rube MCP service (https://rube.app/mcp) which requires Google OAuth authentication. Users must authenticate their Google account through the external service.
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
50
社区
100
安全
91
规范符合性

你能构建什么

CRM 数据同步

保持客户记录在数据库和 Google Sheets 之间同步。使用 upsert 操作基于电子邮件地址作为唯一键来更新现有联系人或添加新联系人。

库存跟踪

在共享电子表格中维护实时库存水平。读取当前库存,在销售后更新数量,并为低库存项应用红色背景色以提高可见性。

报告生成自动化

通过从多个表格提取数据、使用粗体样式格式化标题、并将摘要指标写入仪表板表格供团队审查,来生成每周报告。

试试这些提示

读取表格数据
Read the data from 'Sheet1' in my Google Sheet named 'Q4 Sales Data'. Show me the first 100 rows from columns A through F.
更新多个单元格
Update the 'Inventory' spreadsheet. In the 'Stock' sheet, set quantity to 50 for rows where SKU is 'PROD-001' through 'PROD-010'. Use batch update for efficiency.
与数据库同步
Upsert these customer records into the 'Clients' sheet in my 'CRM Database' spreadsheet. Use 'Email' as the key column to update existing contacts or add new ones: [your data here]
格式化和仪表板
Create a new sheet called 'Summary' in my 'Analytics' spreadsheet. Copy the total row from 'Data' sheet, make the headers bold with blue background, and set column widths to 200.

最佳实践

  • 在操作之前始终先调用 RUBE_SEARCH_TOOLS 以验证连接并获取当前工具架构
  • 使用有界范围如 'A1:Z1000' 而非无界范围如 'A:Z',以避免在处理大型表格时超时
  • 使用 GOOGLESHEETS_BATCH_GET 将多个读取操作批量组合,以保持在每分钟 60 次读取的速率限制内
  • 在写入之前先读取现有表格数据以了解当前布局,避免覆盖重要信息

避免

  • 不要在有超过 10,000 行的表格上使用无界范围(例如 'A:Z'),因为这会导致超时
  • 不要假设默认表格名称(如 'Sheet1')存在 - 它们依赖于区域设置,在非英语账户中可能不同
  • 不要每分钟执行超过 60 次读取或写入操作,否则 Google Sheets API 将返回速率限制错误

常见问题

我需要 Google API 密钥吗?
不需要。此技能使用 Rube MCP 服务,该服务处理 Google OAuth 身份验证。您只需添加 Rube MCP 服务器端点并通过提供的 OAuth 链接进行身份验证。
速率限制是多少?
Google Sheets 允许每分钟 60 次读取和 60 次写入。超过这些限制会导致错误。使用批量操作(BATCH_GET、BATCH_UPDATE)组合多个操作并保持在限制范围内。
我可以同时处理多个表格吗?
可以。使用 GET_SHEET_NAMES 列出所有标签,然后在操作中按名称引用每个标签。您可以在一个 BATCH_GET 调用中从多个表格读取数据。
为什么我的表格标签名称失败?
表格名称不区分大小写,但必须精确匹配。默认名称依赖于区域设置(例如英语中的 'Sheet1',西班牙语中的 'Hoja 1')。使用 GET_SHEET_NAMES 验证实际标签名称。
如何使用颜色格式化单元格?
使用 FORMAT_CELL 与来自 GET_SPREADSHEET_INFO 的数字 worksheet_id(而非标签名称)。颜色值是 0.0 到 1.0 的浮点数,而非 0-255 的整数。对于红色背景,设置 red=1.0、green=0.0、blue=0.0。
update 和 upsert 之间有什么区别?
UPDATE 在特定位置覆盖单元格。UPSERT 更新与键列(如 Email)匹配的现有行,或者如果没有匹配则追加新行。在想要避免重复的同步场景中使用 UPSERT。

开发者详情

文件结构

📄 SKILL.md