Community程式設計與開發github.com

Google Docs 自動化

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

Google Docs 自動化 是什麼?

這項技能讓 AI 代理程式能以程式化方式管理 Google Docs,透過 Rube MCP (Composio) 工具組來建立、編輯、搜尋、匯出、複製及更新文件。它支援多種平台,例如 Claude Code、Cursor 和 Codex,只要這些平台能設定 Rube MCP 伺服器即可。使用者可先安裝 Rube MCP 端點,並透過 `RUBE_MANAGE_CONNECTIONS` 驗證 Google Docs 連線。所有工具呼叫都應先使用 `RUBE_SEARCH_TOOLS` 以取得最新的工具結構描述。核心工作流程包括建立新文件、以 Markdown 更新內容、搜尋文件、尋找並取代文字、匯出為 PDF 以及複製文件。常見的模式有「搜尋後編輯」、「從範本建立」以及「批次插入文字」。這項技能也能與 Google Drive 共用工具整合,讓文件在建立後能直接共用。

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

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · 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: 使用正規表達式搜尋 find_text
  - 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 設定為 true 可安全地在結尾新增文字。
  • GOOGLEDOCS_UPDATE_EXISTING_DOCUMENT 需要建構 editDocs 請求主體,其中包含原始的 Google Docs API 批次更新請求 — 請查閱 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.

ably-automation

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

abstract-automation

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

abuselpdb-automation

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

abyssale-automation

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

accelo-automation

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

accredible-certificates-automation

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

acculynx-automation

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

active-campaign-automation

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

addresszen-automation

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

adobe-automation

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

adrapid-automation

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

adyntel-automation

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

aeroleads-automation

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

aero-workflow-automation

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

affinda-automation

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

affinity-automation

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

agencyzoom-automation

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

agent-mail-automation

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

agentql-automation

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

agenty-automation

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

相關技能