Community寫作與編輯github.com

ComposioHQ/googledocs-automation

透過 Rube MCP (Composio) 自動化 Google Docs 任務:建立、編輯、搜尋、匯出、複製與更新文件。請務必先搜尋工具以取得最新架構。

googledocs-automation 是什麼?

此技能讓 AI 代理程式能透過 Rube MCP (Composio) 自動化 Google Docs 的各項操作,包括建立、編輯、搜尋、匯出 PDF、複製與批次插入文字。它支援 Claude Code、Cursor、Codex 等代理平台,只要將 Rube MCP 端點加入用戶端設定即可使用。技能會透過 `RUBE_SEARCH_TOOLS` 確認工具可用性,並以 `RUBE_MANAGE_CONNECTIONS` 管理 googledocs 套件授權連線。主要工作流程涵蓋 Markdown 更新、搜尋後編輯、範本複製與文字取代,並特別提醒 `GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN` 會覆蓋整份文件、`GOOGLEDOCS_INSERT_TEXT_ACTION` 需要精確的插入索引,以及文件 ID 在不同工具間參數名稱可能不同。這套技能大幅提升文件處理效率,適合自動產生報告、範本填寫與批量編輯情境。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/googledocs-automation

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Google Docs 自動化 (透過 Rube MCP)

使用 Rube MCP (Composio) 以程式化方式建立、編輯、搜尋、匯出與管理 Google Docs 文件。

工具組文件:composio.dev/toolkits/googledocs

前置需求

  • Rube MCP 必須已連線(可使用 RUBE_SEARCH_TOOLS)
  • 透過 RUBE_MANAGE_CONNECTIONS 啟用 googledocs 套件的主動連線
  • 請務必先呼叫 RUBE_SEARCH_TOOLS 以取得目前的工具架構

設定

取得 Rube MCP:在用戶端設定中將 https://rube.app/mcp 加入為 MCP 伺服器。無需 API 金鑰,只需加入端點即可運作。

  1. 確認 RUBE_SEARCH_TOOLS 有回應,以驗證 Rube MCP 是否可用
  2. 使用 googledocs 套件呼叫 RUBE_MANAGE_CONNECTIONS
  3. 若連線狀態不為 ACTIVE,請依傳回的驗證連結完成設定
  4. 在執行任何工作流程前,確認連線狀態顯示為 ACTIVE

核心工作流程

1. 建立新文件

使用 GOOGLEDOCS_CREATE_DOCUMENT 建立包含標題與初始文字內容的新 Google Doc。

工具:GOOGLEDOCS_CREATE_DOCUMENT
參數:
  - title(必填):文件名稱/標題
  - text(必填):要插入文件的初始文字內容

2. 搜尋文件

使用 GOOGLEDOCS_SEARCH_DOCUMENTS 依名稱、內容、日期或分享狀態尋找 Google Docs。

工具:GOOGLEDOCS_SEARCH_DOCUMENTS
參數:
  - query:搜尋查詢字串
  - max_results:限制結果數量
  - modified_after / created_after:依日期篩選
  - shared_with_me:篩選分享的文件
  - starred_only:篩選加星號的文件
  - include_shared_drives:搜尋共用雲端硬碟
  - order_by:排序結果
  - page_token:分頁權杖

3. 使用 Markdown 更新文件內容

使用 GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN 以 Markdown 格式文字取代整份文件的內容。

工具:GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN
參數:
  - id(必填):文件 ID
  - markdown(必填):用來取代整份文件內容的 Markdown 文字

4. 尋找並取代文字

使用 GOOGLEDOCS_REPLACE_ALL_TEXT 取代文件中所有符合的字串。

工具:GOOGLEDOCS_REPLACE_ALL_TEXT
參數:
  - document_id(必填):目標文件 ID
  - find_text(必填):要搜尋的文字
  - replace_text(必填):替代文字
  - match_case:區分大小寫(布林值)
  - search_by_regex:使用正則表達式搜尋
  - tab_ids:指定要搜尋的分頁

5. 將文件匯出為 PDF

使用 GOOGLEDOCS_EXPORT_DOCUMENT_AS_PDF 將 Google Doc 匯出為 PDF 格式。

工具:GOOGLEDOCS_EXPORT_DOCUMENT_AS_PDF
參數:
  - file_id(必填):文件檔案 ID
  - filename:輸出的 PDF 檔案名稱

6. 複製文件

使用 GOOGLEDOCS_COPY_DOCUMENT 複製現有的 Google Doc。

工具:GOOGLEDOCS_COPY_DOCUMENT
參數:
  - document_id(必填):要複製的來源文件 ID
  - title:新複本的名稱
  - include_shared_drives:搜尋共用雲端硬碟中的來源

常見模式

  • 搜尋後編輯:使用 GOOGLEDOCS_SEARCH_DOCUMENTS 依名稱尋找文件,然後用傳回的文件 ID 搭配 GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN 或 GOOGLEDOCS_REPLACE_ALL_TEXT 進行修改。
  • 從範本建立:使用 GOOGLEDOCS_COPY_DOCUMENT 複製範本,再用 GOOGLEDOCS_REPLACE_ALL_TEXT 填入預留文字。
  • 擷取後更新:使用 GOOGLEDOCS_GET_DOCUMENT_BY_ID 讀取目前內容,然後用 GOOGLEDOCS_UPDATE_EXISTING_DOCUMENT 套用編輯。
  • 批次插入文字:使用 GOOGLEDOCS_INSERT_TEXT_ACTION 在特定位置(依索引)插入文字,或附加到文件結尾。
  • 分享文件:建立文件後,可搭配 GOOGLEDRIVE_ADD_FILE_SHARING_PREFERENCE(googledrive 套件)分享文件。

已知陷阱

  • GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN 會取代整份文件的內容,不會附加。僅用於完整重寫。
  • GOOGLEDOCS_INSERT_TEXT_ACTION 需要精確的 insertion_index(字元位置)。設定 append_to_end: true 可安全地在結尾新增文字。
  • GOOGLEDOCS_UPDATE_EXISTING_DOCUMENT 需要以原始 Google Docs API 批次更新請求建構 editDocs 請求主體,請查閱 API 文件以了解正確結構。
  • Google Docs 的文件 ID 與檔案 ID 相同,但不同工具間的參數名稱不同(id、document_id、file_id)。
  • GOOGLEDOCS_SEARCH_DOCUMENTS 使用 Google Drive 搜尋語法作為 query 參數(例如 name contains 'report')。

快速參考

動作工具主要參數
建立文件GOOGLEDOCS_CREATE_DOCUMENTtitle、text
搜尋文件GOOGLEDOCS_SEARCH_DOCUMENTSquery、max_results、modified_after
依 ID 取得文件GOOGLEDOCS_GET_DOCUMENT_BY_IDid
使用 Markdown 更新GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWNid、markdown
程式化編輯GOOGLEDOCS_UPDATE_EXISTING_DOCUMENTdocument_id、editDocs
插入文字GOOGLEDOCS_INSERT_TEXT_ACTIONdocument_id、text_to_insert、insertion_index
尋找並取代GOOGLEDOCS_REPLACE_ALL_TEXTdocument_id、find_text、replace_text
匯出為 PDFGOOGLEDOCS_EXPORT_DOCUMENT_AS_PDFfile_id、filename
複製文件GOOGLEDOCS_COPY_DOCUMENTdocument_id、title

由 Composio 提供技術支援

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相關技能