微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📄

智能文档协作与自动化中枢

google-docs-connector · v1.0.1
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
办公 安全 A 级 作者 agentpmt 公开目录收录
327 下载 0 安装 872 收藏 1 浏览

简介

AgentPMT官方出品的Google Docs连接器,基于OAuth安全认证,支持AI代理完成文档创建、富文本编排、批量更新、多格式导出及权限管理,实现企业级报告生成与协作工作流自动化。

原始描述

Google Docs Connector: Google Docs: create, edit, format documents. Tables, images, headers, page breaks. Export to PDF/DOCX/HTML. Share and manage permissions. Use when an agent needs google docs connector, document automation, report generation, template creation, collaborative editing, batch update, document id, requests through AgentPMT-hosted remote tool calls. Discovery terms: google docs connector, document automation, report generation, template creation, collaborative editing.

通过你的 Agent 添加

安装目录:google-docs-connector/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/google-docs-connector/
Codex CLI~/.codex/skills/google-docs-connector/
DeepSeek Harness~/.agents/skills/google-docs-connector/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Google Docs Connector 是 AgentPMT 平台官方提供的 Google Docs 集成技能,通过 OAuth 认证实现 AI 代理对 Google 文档的全生命周期管理。该技能支持 19 种核心操作,涵盖文档创建(create_document、quick_create)、内容编辑(insert_text、replace_text、batch_update)、富格式编排(format_text 支持粗体、斜体、下划线、删除线、自定义字体、段落对齐、行距缩进等)、结构化元素插入(表格create_table、图片insert_image、页眉页脚、分页符insert_page_break、命名书签create_named_range)、文档检索(search_documents、get_document 支持多标签页扁平化索引)、多格式导出(PDF、DOCX、ODT、RTF、TXT、HTML、EPUB)以及权限管控(share_document、get_permissions)。特别值得注意的是,该技能采用零基 UTF-16 编码单元索引系统,支持精确到标签页(tab_id)的局部更新,并可通过 batch_update 执行原生 Google Docs API 请求以实现高级操作如项目符号列表创建。

显著优点

平台权威性与生态深度:作为 AgentPMT 官方 Marketplace 产品,由平台直接维护,版本更新至 2026-08-05,具备官方技术背书。深度集成 Google Workspace 生态,支持从自然语言描述直接生成文档(quick_create),大幅降低 AI 代理的内容生产门槛。

功能完备度极高:覆盖文档工作流全场景——从单条文本插入到批量结构化更新,从基础格式调整到复杂表格数据填充,从个人文档管理到团队协作权限配置。19 个原子化 action 可灵活组合,满足报告生成、合同起草、会议纪要、文档模板化等垂直场景。

索引精度与多标签支持:get_document 返回扁平化的标签页数组,包含精确的 startIndex/endIndex 边界,支持跨标签页的精准内容定位与批量替换,这是多数简化版文档 API 不具备的能力。

格式导出多样性:原生支持 7 种导出格式,二进制格式自动 base64 编码,便于 AI 代理后续处理或传输。

潜在缺点与局限性

OAuth 依赖与权限门槛:必须完成 AgentPMT 账户 MCP/REST 接入配置(需安装 agentpmt-account-mcp-rest-api-setup 技能),且用户需主动授权 Google 账户访问权限,增加了初次使用复杂度。

按调用计费成本:所有操作统一消耗 5 credits/次,batch_update 与单条 insert_text 成本相同,高频精细操作可能导致成本累积。无免费额度或批量折扣机制披露。

索引漂移问题:文档编辑后需重新 get_document 获取最新索引,长文档的频繁更新存在索引偏移风险,需要代理实现幂等或重试逻辑。

图片插入限制:insert_image 仅支持公开可访问的 URL,不支持直接上传二进制数据或 base64 编码,对敏感图片或内网资源场景不友好。

x402 未启用:该技能未接入 x402 支付流,无法通过加密货币钱包直接调用,限制了 Web3 原生工作流的集成可能性。

适合的目标群体

  • 企业知识管理团队:需要自动化生成标准化报告、会议纪要、合同模板,并维护版本与权限体系
  • 内容运营与营销团队:批量生产结构化文档、多格式导出适配不同发布渠道
  • 产品/项目经理:协作编辑需求文档、PRD、项目计划书,需精细控制团队成员的读写权限
  • 开发者与自动化工程师:构建文档工作流 Agent,需要原子化 API 进行编排组合
  • 教育与研究机构:学术报告生成、论文协作、格式标准化处理

使用风险

性能风险:Google API 存在速率限制,高频批量操作可能触发配额节流;get_document 返回完整文档结构,大文件(>10MB)解析存在内存与延迟压力。

数据一致性风险:并发编辑场景下,代理获取的索引可能在写入前被其他用户修改,建议实现乐观锁或版本校验机制。

权限泄露风险:share_document 的 share_with 配置若误设为 anyone 或错误邮箱,可能导致敏感文档外泄,需代理严格校验权限参数。

OAuth 令牌过期:长期运行的自动化流程需处理令牌刷新,否则可能出现认证中断。

成本不可控风险:无用量预警或预算上限机制,自动化循环调用可能导致 credits 快速耗尽。

技能正文


name: google-docs-connector description: "Google Docs Connector: Google Docs: create, edit, format documents. Tables, images, headers, page breaks. Export to PDF/DOCX/HTML. Share and manage permissions. Use when an agent needs google docs connector, document automation, report generation, template creation, collaborative editing, batch update, document id, requests through AgentPMT-hosted remote tool calls. Discovery terms: google docs connector, document automation, report generation, template creation, collaborative editing." version: 1.0.1 homepage: https://www.agentpmt.com/marketplace/google-docs-connector compatibility: "Agent instructions for AgentPMT-hosted remote tool calls. Follow this skill body for supported account, wallet, and setup routes. No local command runtime is declared." metadata: {"author":"agentpmt","openclaw":{"homepage":"https://www.agentpmt.com/marketplace/google-docs-connector"}}

Google Docs Connector

Freshness

Last updated: 2026-08-05.

If the current date is more than 7 days after the last updated date, reinstall this skill from skills.sh or ClawHub before relying on endpoints, schemas, setup steps, or examples.

What This Tool Does

Comprehensive Google Docs management tool enabling AI agents to create edit format and share documents through OAuth authentication. Supports rich text formatting with bold italic underline strikethrough and custom fonts paragraph styling with alignment spacing and indentation table creation and manipulation image insertion from URLs headers footers and page breaks named ranges for bookmarking document export to multiple formats including PDF DOCX HTML and EPUB sharing and permission management and natural language document creation. Perfect for document automation report generation collaborative editing template creation and content management workflows.

Product Instructions

Google Docs

Create, edit, format, and share Google Docs. Search for documents by name.

Parameters
  • action (string, required): Action to perform. Use get_instructions for full details.
  • document_id (string): Google Docs document ID (from the document URL). Required for most actions except create_document, search_documents, quick_create.
  • tab_id (string): Target tab for tab-scoped updates. Get this from get_document → tabs[].tab_id. Indexed updates default to the first tab when omitted. replace_text applies to all tabs when omitted.
  • title (string): Document title. Required for: create_document
  • query (string): Search term for search_documents. Matches document names (contains match).
  • max_results (integer, default 20, range 1-100): Maximum results for search_documents
  • text (string): Text content for insert_text, create_document (initial content), replace_text, quick_create
  • location (integer): Zero-based UTF-16 code-unit index for insertions. Defaults to 1, normally the beginning of a tab body.
  • range_start (integer): Zero-based, inclusive UTF-16 code-unit start index for format_text and create_named_range.
  • range_end (integer): Zero-based, exclusive UTF-16 code-unit end index for format_text and create_named_range.
  • search_text (string): Text to find. Required for: replace_text
  • replace_with (string): Replacement text. Required for: replace_text
  • match_case (boolean, default false): Case-sensitive search for replace_text
  • requests (array of objects): Raw batch update requests for batch_update
  • text_style (object): Styling: bold, italic, underline, strikethrough, font_family, font_size, foreground_color, background_color, link
  • paragraph_style (object): Styling: named_style_type (NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1 through HEADING_6), alignment (START/CENTER/END/JUSTIFIED), line_spacing (100/150/200), indents
  • rows (integer, 1-100): Table rows for create_table
  • columns (integer, 1-20): Table columns for create_table
  • table_data (array of arrays): 2D string array of cell data for create_table
  • image_url (string): Publicly accessible image URL for insert_image
  • width (integer): Image width in pixels
  • height (integer): Image height in pixels
  • export_format (string): One of: pdf, docx, odt, rtf, txt, html, epub, zip
  • share_with (array of objects): Each with email, role (reader/writer/commenter), type (user/group/domain/anyone)
  • send_notification (boolean, default true): Send email when sharing
  • email_message (string): Custom sharing notification message
Actions
get_instructions

Returns this documentation.

create_document

Creates a new Google Doc.

Required: title Optional: text (initial content)

get_document

Retrieves content and indexed structure from every document tab, including nested child tabs.

Required: document_id

The response includes a flattened tabs array in UI order. Each item contains tab_id, title/hierarchy metadata, extracted text_content, and the complete document_tab structure with Google-provided startIndex and endIndex values. Use those returned indices and the matching tab_id for subsequent updates.

Indices are zero-based UTF-16 code-unit offsets; startIndex is inclusive and endIndex is exclusive. Refetch the document after edits that can shift indices.

search_documents

Searches for Google Docs by name. Returns documents sorted by most recently modified.

Optional: query (name contains match), max_results

If query is omitted, lists recent Google Docs.

insert_text

Inserts text at a specific position.

Required: document_id, text Optional: location (default: 1), tab_id

replace_text

Finds and replaces all occurrences of text.

Required: document_id, search_text, replace_with Optional: match_case, tab_id. If tab_id is omitted, replacement applies to all tabs.

format_text

Applies text and paragraph styling to a range.

Required: document_id, range_start, range_end, and at least one of text_style or paragraph_style Optional: tab_id

update_style

Alias for format_text.

insert_image

Inserts an inline image.

Required: document_id, image_url Optional: location, width, height, tab_id

create_table

Inserts a table, optionally populated with data.

Required: document_id Optional: rows, columns, table_data, location, tab_id

If table_data is provided, dimensions are inferred from it.

insert_page_break

Required: document_id Optional: location, tab_id

insert_section_break

Required: document_id Optional: location, tab_id

create_header

Required: document_id Optional: header_type (DEFAULT, FIRST_PAGE, EVEN_PAGE, ODD_PAGE), text

create_footer

Required: document_id Optional: footer_type (DEFAULT, FIRST_PAGE, EVEN_PAGE, ODD_PAGE)

create_named_range

Required: document_id, range_name, range_start, range_end Optional: tab_id

export_document

Exports to another format. Text formats return content directly; binary formats return base64.

Required: document_id, export_format

share_document

Sets sharing permissions via Google Drive.

Required: document_id, share_with Optional: send_notification, email_message

get_permissions

Lists current sharing settings.

Required: document_id

batch_update

Executes raw Google Docs API batch update requests for advanced operations.

Required: document_id, requests

For a request containing a range or location, put tabId inside that raw range/location. The top-level tab_id parameter is not injected into raw requests.

quick_create

Creates a document from a natural language description.

Required: text Optional: title

Examples
{"action":"search_documents","query":"meeting notes"}
{"action":"search_documents","query":"Q1 report","max_results":5}
{"action":"create_document","title":"Meeting Notes","text":"Agenda:\n1. Review\n2. Planning"}
{"action":"get_document","document_id":"1a2b3c4d5e"}
{"action":"insert_text","document_id":"1a2b3c4d5e","tab_id":"t.abc123","text":"New paragraph\n","location":1}
{"action":"replace_text","document_id":"1a2b3c4d5e","search_text":"draft","replace_with":"final"}
{"action":"format_text","document_id":"1a2b3c4d5e","tab_id":"t.abc123","range_start":1,"range_end":10,"text_style":{"bold":true,"font_size":{"magnitude":14,"unit":"PT"}}}

Apply a real heading style in a specific tab:

{"action":"format_text","document_id":"1a2b3c4d5e","tab_id":"t.abc123","range_start":1,"range_end":18,"paragraph_style":{"named_style_type":"HEADING_1"}}

Create a real numbered list in a specific tab using indices returned by get_document:

{"action":"batch_update","document_id":"1a2b3c4d5e","requests":[{"createParagraphBullets":{"range":{"tabId":"t.abc123","startIndex":20,"endIndex":58},"bulletPreset":"NUMBERED_DECIMAL_ALPHA_ROMAN"}}]}
{"action":"export_document","document_id":"1a2b3c4d5e","export_format":"pdf"}
{"action":"share_document","document_id":"1a2b3c4d5e","share_with":[{"email":"user@example.com","role":"writer","type":"user"}]}
Response

All responses return {"success": true, "output": { ... }}. Output varies by action:

  • search_documents → {"query": "...", "result_count": N, "documents": [{"document_id", "name", "modified_time", "web_view_link", ...}]}
  • create_document → {"document_id", "title", "revision_id"}
  • get_document → {"document_id", "title", "text_content", "word_count", "tab_count", "tabs", "index_semantics", "raw_document"}
  • replace_text → {"occurrences_changed": N}
  • export_document → {"content": "..."} (text) or {"content_base64": "..."} (binary)
  • share_document → {"permissions_added": N, "permissions": [...]}
  • get_permissions → {"permissions": [...]}

When To Use

  • Use this skill for Google Docs Connector on AgentPMT.
  • Use it when an agent needs this specific tool's behavior, schema, inputs, outputs, and invocation shape.
  • Search and activation keywords: google docs connector, document automation, report generation, template creation, collaborative editing, batch update, document id, requests.
  • Supported action names: batch_update, create_document, create_footer, create_header, create_named_range, create_table, export_document, format_text, get_document, get_permissions, insert_image, insert_page_break, insert_section_break, insert_text, quick_create, replace_text, search_documents, share_document, update_style.

Use Cases

  • document automation
  • report generation
  • template creation
  • collaborative editing
  • content management
  • proposal writing
  • meeting agenda creation
  • contract generation
  • documentation workflows
  • batch document processing

Categories And Industries

No categories or industry tags are published for this tool.

Actions And Schema

Complete generated action schema: ./schema.md. Supported action count: 19. x402 availability: not enabled for this product.

  • batch_update (action slug: batch-update): Execute raw Google Docs API batch update requests. Put tabId inside each raw range or location when targeting a non-first tab. Price: 5 credits. Parameters: document_id, requests.
  • create_document (action slug: create-document): Create a new Google Doc. Price: 5 credits. Parameters: text, title.
  • create_footer (action slug: create-footer): Add a footer to the document. Price: 5 credits. Parameters: document_id, footer_type.
  • create_header (action slug: create-header): Add a header to the document. Price: 5 credits. Parameters: document_id, header_type, text.
  • create_named_range (action slug: create-named-range): Create a named range (bookmark) spanning a character range in the document. Price: 5 credits. Parameters: document_id, range_end, range_name, range_start, tab_id.
  • create_table (action slug: create-table): Insert a table into a document, optionally populated with data. If table_data is provided, dimensions are inferred from it. Price: 5 credits. Parameters: columns, document_id, location, rows, tab_id, table_data.
  • export_document (action slug: export-document): Export a document to another format. Text formats (txt, html) return content directly; binary formats return base64-encoded content. Price: 5 credits. Parameters: document_id, export_format.
  • format_text (action slug: format-text): Apply text and/or paragraph styling to a zero-based UTF-16 range in a specific document tab. Provide at least one non-empty style object. Price: 5 credits. Parameters: document_id, paragraph_style, range_end, range_start, tab_id, text_style.
  • get_document (action slug: get-document): Retrieve content and indexed structure from every document tab, including nested child tabs. Price: 5 credits. Parameters: document_id.
  • get_permissions (action slug: get-permissions): List the current sharing permissions on a document. Price: 5 credits. Parameters: document_id.
  • insert_image (action slug: insert-image): Insert an inline image from a publicly accessible URL. Price: 5 credits. Parameters: document_id, height, image_url, location, tab_id, width.
  • insert_page_break (action slug: insert-page-break): Insert a page break at a specific position. Price: 5 credits. Parameters: document_id, location, tab_id.
  • insert_section_break (action slug: insert-section-break): Insert a section break at a specific position. Price: 5 credits. Parameters: document_id, location, tab_id.
  • insert_text (action slug: insert-text): Insert text at a specific character position in a document. Price: 5 credits. Parameters: document_id, location, tab_id, text.
  • quick_create (action slug: quick-create): Create a document from a natural language description. If the text contains 'titled "..."' or 'called "..."', the title is extracted automatically. Price: 5 credits. Parameters: text, title.
  • replace_text (action slug: replace-text): Find and replace text in one tab, or in all tabs when tab_id is omitted. Price: 5 credits. Parameters: document_id, match_case, replace_with, search_text, tab_id.
  • search_documents (action slug: search-documents): Search for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents. Price: 5 credits. Parameters: max_results, query.
  • share_document (action slug: share-document): Set sharing permissions on a document via Google Drive. Price: 5 credits. Parameters: document_id, email_message, send_notification, share_with.
  • update_style (action slug: update-style): Alias for format_text. Apply text and/or paragraph styling to a zero-based UTF-16 range in a specific tab. Price: 5 credits. Parameters: document_id, paragraph_style, range_end, range_start, tab_id, text_style.

Live Schema And Examples

Use the compact schema above for ordinary calls. Before a new production integration, or whenever parameters, enum values, nested objects, outputs, or examples are unclear, fetch live details first.

  • Exact schema: call agentpmt-tool-search-and-execution with action: "get_schema", and tool_id: "google-docs-connector".
  • Detailed examples: call agentpmt-tool-search-and-execution with action: "get_instructions" and tool_id: "google-docs-connector", or call this product with action: "get_instructions" when the product tool is already selected.
  • Treat returned live schema and instructions as more specific than this generated summary.

MCP schema lookup through the main AgentPMT MCP server:

{
  "method": "tools/call",
  "params": {
    "name": "AgentPMT-Tool-Search-and-Execution",
    "arguments": {
      "action": "get_schema",
      "tool_id": "google-docs-connector"
    }
  }
}

For live examples, keep the same MCP tool and use these arguments:

{
  "action": "get_instructions",
  "tool_id": "google-docs-connector"
}

Authenticated AgentPMT REST schema lookup body:

{
  "name": "agentpmt-tool-search-and-execution",
  "parameters": {
    "action": "get_schema",
    "tool_id": "google-docs-connector"
  }
}

Authenticated AgentPMT REST live examples body:

{
  "name": "agentpmt-tool-search-and-execution",
  "parameters": {
    "action": "get_instructions",
    "tool_id": "google-docs-connector"
  }
}

Call This Tool

Product slug: google-docs-connector

Marketplace page: https://www.agentpmt.com/marketplace/google-docs-connector

  • AgentPMT account route: first use ../agentpmt-account-mcp-rest-api-setup to connect the main MCP server or REST API for an Agent Group where this tool is enabled.
  • x402 route: not enabled for this product.
  • AgentPMT overview: use ../what-is-agentpmt for marketplace, Agent Group, workflow, MCP, REST, and payment concepts.

If those setup skills are not installed beside this product skill, use the downloads below.

Core AgentPMT setup skills:

  • What AgentPMT is: ../what-is-agentpmt
  • AgentPMT account MCP/REST setup: ../agentpmt-account-mcp-rest-api-setup

skills.sh install script:

npx skills add AgentPMT/agent-skills --skill what-is-agentpmt
npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup

MCP call shape after the main AgentPMT MCP server is connected:

{
  "method": "tools/call",
  "params": {
    "name": "Google-Docs-Connector",
    "arguments": {
      "action": "batch_update",
      "document_id": "example document id",
      "requests": [
        {}
      ]
    }
  }
}

Use the exact tool name returned by tools/list; the name above is the expected readable form.

Authenticated AgentPMT REST call body:

{
  "name": "google-docs-connector",
  "parameters": {
    "action": "batch_update",
    "document_id": "example document id",
    "requests": [
      {}
    ]
  }
}

Use the setup skill for the account connection details before making REST calls.

Response Handling

  • Treat the returned JSON as the source of truth for this tool call.
  • If the response includes warnings or correction targets, apply them before retrying.
  • If the response includes a passed or success-style boolean, use it as the workflow gate.
  • If validation fails or the response shape is unclear, call get_schema or get_instructions before retrying.
  • If batch_update fails, preserve the request parameters and retry only after fixing schema, auth, or payment errors.

Security

  • Do not place account secrets, wallet private keys, mnemonics, signatures, or payment headers in prompts or logs.
  • Keep tool inputs scoped to the minimum content needed for the task.
  • Use the setup skills for credential handling; this product skill only defines product-specific behavior.

AgentPMT Reference

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

officedocsautomationproductivitycontent-mediaapi

同类 Skill