[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-e8d9385c-a539-411a-a359-eb0d4ed7367f":3,"$fz5wkUMH4fg0pmgFU67RRrZbCFtqQMOLcm1lH1SK2DYA":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"e8d9385c-a539-411a-a359-eb0d4ed7367f","googlesheets-automation","通过Rube MCP（Composio）自动化Google Sheets操作（读取、写入、格式化、筛选、管理电子表格）。读取\u002F写入数据、管理标签页、应用格式化，并按程序搜索行。","cat_prod_automation","mod_productivity","sickn33,productivity","---\nname: googlesheets-automation\ndescription: \"Automate Google Sheets operations (read, write, format, filter, manage spreadsheets) via Rube MCP (Composio). Read\u002Fwrite data, manage tabs, apply formatting, and search rows programmatically.\"\nrisk: critical\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Google Sheets Automation via Rube MCP\n\nAutomate Google Sheets workflows including reading\u002Fwriting data, managing spreadsheets and tabs, formatting cells, filtering rows, and upserting records through Composio's Google Sheets toolkit.\n\n## Prerequisites\n\n- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)\n- Active Google Sheets connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `googlesheets`\n- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas\n\n## Setup\n\n**Get Rube MCP**: Add `https:\u002F\u002Frube.app\u002Fmcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.\n\n1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds\n2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `googlesheets`\n3. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth\n4. Confirm connection status shows ACTIVE before running any workflows\n\n## Core Workflows\n\n### 1. Read and Write Data\n\n**When to use**: User wants to read data from or write data to a Google Sheet\n\n**Tool sequence**:\n1. `GOOGLESHEETS_SEARCH_SPREADSHEETS` - Find spreadsheet by name if ID unknown [Prerequisite]\n2. `GOOGLESHEETS_GET_SHEET_NAMES` - Enumerate tab names to target the right sheet [Prerequisite]\n3. `GOOGLESHEETS_BATCH_GET` - Read data from one or more ranges [Required]\n4. `GOOGLESHEETS_BATCH_UPDATE` - Write data to a range or append rows [Required]\n5. `GOOGLESHEETS_VALUES_UPDATE` - Update a single specific range [Alternative]\n6. `GOOGLESHEETS_SPREADSHEETS_VALUES_APPEND` - Append rows to end of table [Alternative]\n\n**Key parameters**:\n- `spreadsheet_id`: Alphanumeric ID from the spreadsheet URL (between '\u002Fd\u002F' and '\u002Fedit')\n- `ranges`: A1 notation array (e.g., 'Sheet1!A1:Z1000'); always use bounded ranges\n- `sheet_name`: Tab name (case-insensitive matching supported)\n- `values`: 2D array where each inner array is a row\n- `first_cell_location`: Starting cell in A1 notation (omit to append)\n- `valueInputOption`: 'USER_ENTERED' (parsed) or 'RAW' (literal)\n\n**Pitfalls**:\n- Mis-cased or non-existent tab names error \"Sheet 'X' not found\"\n- Empty ranges may omit `valueRanges[i].values`; treat missing as empty array\n- `GOOGLESHEETS_BATCH_UPDATE` values must be a 2D array (list of lists), even for a single row\n- Unbounded ranges like 'A:Z' on sheets with >10,000 rows may cause timeouts; always bound with row limits\n- Append follows the detected `tableRange`; use returned `updatedRange` to verify placement\n\n### 2. Create and Manage Spreadsheets\n\n**When to use**: User wants to create a new spreadsheet or manage tabs within one\n\n**Tool sequence**:\n1. `GOOGLESHEETS_CREATE_GOOGLE_SHEET1` - Create a new spreadsheet [Required]\n2. `GOOGLESHEETS_ADD_SHEET` - Add a new tab\u002Fworksheet [Required]\n3. `GOOGLESHEETS_UPDATE_SHEET_PROPERTIES` - Rename, hide, reorder, or color tabs [Optional]\n4. `GOOGLESHEETS_GET_SPREADSHEET_INFO` - Get full spreadsheet metadata [Optional]\n5. `GOOGLESHEETS_FIND_WORKSHEET_BY_TITLE` - Check if a specific tab exists [Optional]\n\n**Key parameters**:\n- `title`: Spreadsheet or sheet tab name\n- `spreadsheetId`: Target spreadsheet ID\n- `forceUnique`: Auto-append suffix if tab name exists (default true)\n- `properties.gridProperties`: Set row\u002Fcolumn counts, frozen rows\n\n**Pitfalls**:\n- Sheet names must be unique within a spreadsheet\n- Default sheet names are locale-dependent ('Sheet1' in English, 'Hoja 1' in Spanish)\n- Don't use `index` when creating multiple sheets in parallel (causes 'index too high' errors)\n- `GOOGLESHEETS_GET_SPREADSHEET_INFO` can return 403 if account lacks access\n\n### 3. Search and Filter Rows\n\n**When to use**: User wants to find specific rows or apply filters to sheet data\n\n**Tool sequence**:\n1. `GOOGLESHEETS_LOOKUP_SPREADSHEET_ROW` - Find first row matching exact cell value [Required]\n2. `GOOGLESHEETS_SET_BASIC_FILTER` - Apply filter\u002Fsort to a range [Alternative]\n3. `GOOGLESHEETS_CLEAR_BASIC_FILTER` - Remove existing filter [Optional]\n4. `GOOGLESHEETS_BATCH_GET` - Read filtered results [Optional]\n\n**Key parameters**:\n- `query`: Exact text value to match (matches entire cell content)\n- `range`: A1 notation range to search within\n- `case_sensitive`: Boolean for case-sensitive matching (default false)\n- `filter.range`: Grid range with sheet_id for basic filter\n- `filter.criteria`: Column-based filter conditions\n- `filter.sortSpecs`: Sort specifications\n\n**Pitfalls**:\n- `GOOGLESHEETS_LOOKUP_SPREADSHEET_ROW` matches entire cell content, not substrings\n- Sheet names with spaces must be single-quoted in ranges (e.g., \"'My Sheet'!A:Z\")\n- Bare sheet names without ranges are not supported for lookup; always specify a range\n\n### 4. Upsert Rows by Key\n\n**When to use**: User wants to update existing rows or insert new ones based on a unique key column\n\n**Tool sequence**:\n1. `GOOGLESHEETS_UPSERT_ROWS` - Update matching rows or append new ones [Required]\n\n**Key parameters**:\n- `spreadsheetId`: Target spreadsheet ID\n- `sheetName`: Tab name\n- `keyColumn`: Column header name used as unique identifier (e.g., 'Email', 'SKU')\n- `headers`: List of column names for the data\n- `rows`: 2D array of data rows\n- `strictMode`: Error on mismatched column counts (default true)\n\n**Pitfalls**:\n- `keyColumn` must be an actual header name, NOT a column letter (e.g., 'Email' not 'A')\n- If `headers` is NOT provided, first row of `rows` is treated as headers\n- With `strictMode=true`, rows with more values than headers cause an error\n- Auto-adds missing columns to the sheet\n\n### 5. Format Cells\n\n**When to use**: User wants to apply formatting (bold, colors, font size) to cells\n\n**Tool sequence**:\n1. `GOOGLESHEETS_GET_SPREADSHEET_INFO` - Get numeric sheetId for target tab [Prerequisite]\n2. `GOOGLESHEETS_FORMAT_CELL` - Apply formatting to a range [Required]\n3. `GOOGLESHEETS_UPDATE_SHEET_PROPERTIES` - Change frozen rows, column widths [Optional]\n\n**Key parameters**:\n- `spreadsheet_id`: Spreadsheet ID\n- `worksheet_id`: Numeric sheetId (NOT tab name); get from GET_SPREADSHEET_INFO\n- `range`: A1 notation (e.g., 'A1:F1') - preferred over index fields\n- `bold`, `italic`, `underline`, `strikethrough`: Boolean formatting options\n- `red`, `green`, `blue`: Background color as 0.0-1.0 floats (NOT 0-255 ints)\n- `fontSize`: Font size in points\n\n**Pitfalls**:\n- Requires numeric `worksheet_id`, not tab title; get from spreadsheet metadata\n- Color channels are 0-1 floats (e.g., 1.0 for full red), NOT 0-255 integers\n- Responses may return empty reply objects ([{}]); verify formatting via readback\n- Format one range per call; batch formatting requires separate calls\n\n## Common Patterns\n\n### ID Resolution\n- **Spreadsheet name -> ID**: `GOOGLESHEETS_SEARCH_SPREADSHEETS` with `query`\n- **Tab name -> sheetId**: `GOOGLESHEETS_GET_SPREADSHEET_INFO`, extract from sheets metadata\n- **Tab existence check**: `GOOGLESHEETS_FIND_WORKSHEET_BY_TITLE`\n\n### Rate Limits\nGoogle Sheets enforces strict rate limits:\n- Max 60 reads\u002Fminute and 60 writes\u002Fminute\n- Exceeding limits causes errors; batch operations where possible\n- Use `GOOGLESHEETS_BATCH_GET` and `GOOGLESHEETS_BATCH_UPDATE` for efficiency\n\n### Data Patterns\n- Always read before writing to understand existing layout\n- Use `GOOGLESHEETS_UPSERT_ROWS` for CRM syncs, inventory updates, and dedup scenarios\n- Append mode (omit `first_cell_location`) is safest for adding new records\n- Use `GOOGLESHEETS_CLEAR_VALUES` to clear content while preserving formatting\n\n## Known Pitfalls\n\n- **Tab names**: Locale-dependent defaults; 'Sheet1' may not exist in non-English accounts\n- **Range notation**: Sheet names with spaces need single quotes in A1 notation\n- **Unbounded ranges**: Can timeout on large sheets; always specify row bounds (e.g., 'A1:Z10000')\n- **2D arrays**: All value parameters must be list-of-lists, even for single rows\n- **Color values**: Floats 0.0-1.0, not integers 0-255\n- **Formatting IDs**: `FORMAT_CELL` needs numeric sheetId, not tab title\n- **Rate limits**: 60 reads\u002Fmin and 60 writes\u002Fmin; batch to stay within limits\n- **Delete dimension**: `GOOGLESHEETS_DELETE_DIMENSION` is irreversible; double-check bounds\n\n## Quick Reference\n\n| Task | Tool Slug | Key Params |\n|------|-----------|------------|\n| Search spreadsheets | `GOOGLESHEETS_SEARCH_SPREADSHEETS` | `query`, `search_type` |\n| Create spreadsheet | `GOOGLESHEETS_CREATE_GOOGLE_SHEET1` | `title` |\n| List tabs | `GOOGLESHEETS_GET_SHEET_NAMES` | `spreadsheet_id` |\n| Add tab | `GOOGLESHEETS_ADD_SHEET` | `spreadsheetId`, `title` |\n| Read data | `GOOGLESHEETS_BATCH_GET` | `spreadsheet_id`, `ranges` |\n| Read single range | `GOOGLESHEETS_VALUES_GET` | `spreadsheet_id`, `range` |\n| Write data | `GOOGLESHEETS_BATCH_UPDATE` | `spreadsheet_id`, `sheet_name`, `values` |\n| Update range | `GOOGLESHEETS_VALUES_UPDATE` | `spreadsheet_id`, `range`, `values` |\n| Append rows | `GOOGLESHEETS_SPREADSHEETS_VALUES_APPEND` | `spreadsheetId`, `range`, `values` |\n| Upsert rows | `GOOGLESHEETS_UPSERT_ROWS` | `spreadsheetId`, `sheetName`, `keyColumn`, `rows` |\n| Lookup row | `GOOGLESHEETS_LOOKUP_SPREADSHEET_ROW` | `spreadsheet_id`, `query` |\n| Format cells | `GOOGLESHEETS_FORMAT_CELL` | `spreadsheet_id`, `worksheet_id`, `range` |\n| Set filter | `GOOGLESHEETS_SET_BASIC_FILTER` | `spreadsheetId`, `filter` |\n| Clear values | `GOOGLESHEETS_CLEAR_VALUES` | `spreadsheet_id`, range |\n| Delete rows\u002Fcols | `GOOGLESHEETS_DELETE_DIMENSION` | `spreadsheet_id`, `sheet_name`, dimension |\n| Spreadsheet info | `GOOGLESHEETS_GET_SPREADSHEET_INFO` | `spreadsheet_id` |\n| Update tab props | `GOOGLESHEETS_UPDATE_SHEET_PROPERTIES` | `spreadsheetId`, properties |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,90,2026,"2026-05-16 13:21:18",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"效率工具","productivity","mdi-lightning-bolt-outline","文档处理、数据分析、自动化工作流",4,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"自动化","automation","mdi-robot-outline","工作流自动化、批处理",3,101,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"86f36853-f9ff-44fa-aab4-37c2b4f754cc","1.0.0","googlesheets-automation.zip",4028,"uploads\u002Fskills\u002Fe8d9385c-a539-411a-a359-eb0d4ed7367f\u002Fgooglesheets-automation.zip","2d6f6fc3a82bd5b5b910aad9cc9f2a87e6fe6cd9d7d6ad5193342638c7a55133","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":10330}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]