Awesome-claude-skills-cn googledocs-automation
通过 Rube MCP(Composio)自动化 Google Docs 任务:创建、编辑、搜索、导出、复制和更新文档。始终先搜索工具以获取当前架构。
install
source · Clone the upstream repo
git clone https://github.com/Athe1st3154/awesome-claude-skills-cn
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Athe1st3154/awesome-claude-skills-cn "$T" && mkdir -p ~/.claude/skills && cp -r "$T/composio-skills/googledocs-automation" ~/.claude/skills/athe1st3154-awesome-claude-skills-cn-googledocs-automation && rm -rf "$T"
manifest:
composio-skills/googledocs-automation/SKILL.mdsource content
Google Docs Automation via Rube MCP
Create, edit, search, export, and manage Google Docs documents programmatically using Rube MCP (Composio).
工具包文档: composio.dev/toolkits/googledocs
前提条件
- Rube MCP 必须已连接(RUBE_SEARCH_TOOLS 可用)
- Active connection via
使用工具包RUBE_MANAGE_CONNECTIONSgoogledocs - 始终首先调用
获取当前工具架构RUBE_SEARCH_TOOLS
设置
获取 Rube MCP: 在客户端配置中添加
https://rube.app/mcp 作为 MCP 服务器。 无需 API 密钥 — 只需添加端点即可使用。
- 通过确认
响应来验证 Rube MCP 可用RUBE_SEARCH_TOOLS - 使用工具包
调用googledocsRUBE_MANAGE_CONNECTIONS - 如果连接不是 ACTIVE 状态,按照返回的授权链接完成设置
- 在运行任何工作流程前确认连接状态显示为 ACTIVE
Core Workflows
1. Create a New Document
Use
GOOGLEDOCS_CREATE_DOCUMENT to create a new Google Doc with a title and initial text content.
Tool: GOOGLEDOCS_CREATE_DOCUMENT Parameters: - title (required): Document filename/title - text (required): Initial text content to insert into the document
2. Search for Documents
Use
GOOGLEDOCS_SEARCH_DOCUMENTS to find Google Docs by name, content, date, or sharing status.
Tool: GOOGLEDOCS_SEARCH_DOCUMENTS Parameters: - query: Search query string - max_results: Limit number of results - modified_after / created_after: Filter by date - shared_with_me: Filter shared documents - starred_only: Filter starred documents - include_shared_drives: Search shared drives - order_by: Sort results - page_token: Pagination token
3. Update Document Content with Markdown
Use
GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN to replace the entire content of a document with Markdown-formatted text.
Tool: GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN Parameters: - id (required): Document ID - markdown (required): Markdown content to replace entire document body
4. Find and Replace Text
Use
GOOGLEDOCS_REPLACE_ALL_TEXT to replace all occurrences of a string in a document.
Tool: GOOGLEDOCS_REPLACE_ALL_TEXT Parameters: - document_id (required): Target document ID - find_text (required): Text to search for - replace_text (required): Replacement text - match_case: Case-sensitive matching (boolean) - search_by_regex: Use regex for find_text - tab_ids: Specific tabs to search
5. Export Document as PDF
Use
GOOGLEDOCS_EXPORT_DOCUMENT_AS_PDF to export a Google Doc to PDF format.
Tool: GOOGLEDOCS_EXPORT_DOCUMENT_AS_PDF Parameters: - file_id (required): Document file ID - filename: Output PDF filename
6. Copy a Document
Use
GOOGLEDOCS_COPY_DOCUMENT to duplicate an existing Google Doc.
Tool: GOOGLEDOCS_COPY_DOCUMENT Parameters: - document_id (required): Source document ID to copy - title: Title for the new copy - include_shared_drives: Search shared drives for the source
Common Patterns
- Search then edit: Use
to find a document by name, then use the returned document ID withGOOGLEDOCS_SEARCH_DOCUMENTS
orGOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN
to modify it.GOOGLEDOCS_REPLACE_ALL_TEXT - Create from template: Use
to duplicate a template, thenGOOGLEDOCS_COPY_DOCUMENT
to fill in placeholder text.GOOGLEDOCS_REPLACE_ALL_TEXT - Retrieve then update: Use
to read current content, then apply edits withGOOGLEDOCS_GET_DOCUMENT_BY_ID
.GOOGLEDOCS_UPDATE_EXISTING_DOCUMENT - Batch text insertion: Use
to insert text at specific positions (by index) or append to the end of a document.GOOGLEDOCS_INSERT_TEXT_ACTION - Share documents: Combine with
(googledrive toolkit) to share documents after creation.GOOGLEDRIVE_ADD_FILE_SHARING_PREFERENCE
已知陷阱
replaces the entire document content -- it does not append. Use it for full rewrites only.GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN
requires a preciseGOOGLEDOCS_INSERT_TEXT_ACTION
(character position). Setinsertion_index
to safely add text at the end.append_to_end: true
requires constructing anGOOGLEDOCS_UPDATE_EXISTING_DOCUMENT
request body with raw Google Docs API batch update requests -- consult the API documentation for the correct structure.editDocs- Document IDs and file IDs are the same value for Google Docs, but parameter names differ across tools (
,id
,document_id
).file_id
uses Google Drive search syntax for theGOOGLEDOCS_SEARCH_DOCUMENTS
parameter (e.g.,query
).name contains 'report'
快速参考
| Action | Tool | Key Parameters |
|---|---|---|
| Create document | | , |
| Search documents | | , , |
| Get document by ID | | |
| Update with Markdown | | , |
| Programmatic edits | | , |
| Insert text | | , , |
| Find and replace | | , , |
| Export as PDF | | , |
| Copy document | | , |
由 Composio 提供支持