← 返回
未分类 中文

Google Docs

Google Docs API integration with managed OAuth. Search, read, create, and update Google Docs documents. Use this skill when users want to read document text,...
通过托管 OAuth 集成 Google Docs API,支持搜索、读取、创建和更新文档。适用于用户需要读取文档文本等场景。
hith3sh hith3sh 来源
未分类 clawhub v1.0.5 2 版本 99806.3 Key: 无需
★ 6
Stars
📥 1,426
下载
💾 1
安装
2
版本
#latest

概述

Google Docs

!Google Docs

Access Google Docs via the Google Docs API with managed OAuth authentication. Search, read, create, and update documents stored in Google Drive.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Google Docs API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Google Docs
:---::---::---:
!Install!PairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Google Docs

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│   Google Docs    │
│   (User Chat)   │     │   (OAuth)    │     │   (Docs API)     │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                       │                       │
         │  1. Install Plugin    │                       │
         │  2. Pair Device       │                       │
         │  3. Connect Docs      │                       │
         │                       │  4. Secure Token       │
         │                       │  5. Proxy Requests    │
         │                       │                       │
         ▼                       ▼                       ▼
   ┌──────────┐           ┌──────────┐           ┌──────────┐
   │  SKILL   │           │ Dashboard│           │  Google  │
   │  File    │           │ Auth     │           │  Drive   │
   └──────────┘           └──────────┘           └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for Google Docs again."

Quick Start

# Search for documents
clawlink_call_tool --tool "googledocs_search_documents" --params '{"query": "report"}'

# Get document plaintext
clawlink_call_tool --tool "googledocs_get_document_plaintext" --params '{"document_id": "YOUR_DOCUMENT_ID"}'

# Create a new document
clawlink_call_tool --tool "googledocs_create_document" --params '{"title": "New Document"}'

Authentication

All Google Docs tool calls are authenticated automatically by ClawLink using the user's connected Google account.

No API key is required in chat. ClawLink stores the OAuth token securely and injects it into every Google Docs API request on the user's behalf.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=google-docs and connect Google Docs.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for google-docs in the list.

Verify Connection

clawlink_list_tools --integration google-docs

Response: Returns the live tool catalog for Google Docs.

Reconnect

If Google Docs tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=google-docs
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration google-docs

Security & Permissions

  • Access is scoped to documents within the connected Google account.
  • All write operations require explicit user confirmation. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
  • Destructive actions (delete content range, delete table row/column) are marked as high-impact and must be confirmed.
  • Document sharing permissions can be inspected to understand access levels before making changes.

Tool Reference

Document Discovery & Reading

ToolDescriptionMode
-------------------------
googledocs_search_documentsSearch for Google Docs by name, content, or date rangeRead
googledocs_get_document_by_idRetrieve a document's full metadataRead
googledocs_get_document_plaintextGet a best-effort plain-text rendering of a documentRead
googledocs_export_document_as_pdfExport a document as PDF (10MB limit)Read
googledocs_list_spreadsheet_chartsList charts from a linked Google Sheets spreadsheetRead

Document Creation

ToolDescriptionMode
-------------------------
googledocs_create_documentCreate a new empty document with a titleWrite
googledocs_create_document_markdownCreate a document initialized with Markdown contentWrite

Content Insertion & Updates

ToolDescriptionMode
-------------------------
googledocs_insert_text_actionInsert text at a specific index or append to endWrite
googledocs_replace_all_textReplace all occurrences of a string throughout a documentWrite
googledocs_update_document_markdownReplace entire document content with MarkdownWrite
googledocs_update_document_section_markdownInsert or replace a section of a document with MarkdownWrite
googledocs_update_existing_documentApply programmatic edits via batchUpdate APIWrite
googledocs_update_document_styleUpdate page size, margins, and default text directionWrite

Structural Elements

ToolDescriptionMode
-------------------------
googledocs_insert_table_actionInsert a table at a specific locationWrite
googledocs_insert_table_columnInsert a new column into an existing tableWrite
googledocs_insert_page_breakInsert a page break into a documentWrite
googledocs_insert_inline_imageInsert an image from a URI at a specific locationWrite
googledocs_create_paragraph_bulletsAdd bullet formatting to paragraphs in a rangeWrite
googledocs_delete_paragraph_bulletsRemove bullet formatting from paragraphsWrite

Header, Footer & Named Ranges

ToolDescriptionMode
-------------------------
googledocs_create_headerCreate a new header with optional textWrite
googledocs_create_footerCreate a new footer with optional textWrite
googledocs_create_footnoteAdd a footnote at a location or end of documentWrite
googledocs_create_named_rangeAssign a name to a specific part of a documentWrite
googledocs_delete_headerDelete a header from a documentWrite
googledocs_delete_footerDelete a footer from a documentWrite

Table Operations

ToolDescriptionMode
-------------------------
googledocs_delete_table_rowDelete a row from a tableWrite
googledocs_delete_table_columnDelete a column from a tableWrite
googledocs_unmerge_table_cellsUnmerge previously merged cells in a tableWrite
googledocs_update_table_row_styleUpdate row style (height, header marking)Write

Copying & Duplication

ToolDescriptionMode
-------------------------
googledocs_copy_documentCreate a copy of an existing documentWrite

Deletion

ToolDescriptionMode
-------------------------
googledocs_delete_content_rangeDelete a range of content from a documentWrite
googledocs_delete_named_rangeDelete a named range from a documentWrite

Image Operations

ToolDescriptionMode
-------------------------
googledocs_replace_imageReplace an existing image with a new one from a URIWrite

Code Examples

Search for documents

clawlink_call_tool --tool "googledocs_search_documents" \
  --params '{
    "query": "meeting notes",
    "page_size": 10
  }'

Read document plaintext

clawlink_call_tool --tool "googledocs_get_document_plaintext" \
  --params '{
    "document_id": "YOUR_DOCUMENT_ID"
  }'

Create a document from Markdown

clawlink_call_tool --tool "googledocs_create_document_markdown" \
  --params '{
    "title": "Project Brief",
    "markdown": "# Project Brief\n\n## Overview\n\nThis is the project overview section.\n\n## Next Steps\n\n1. Define requirements\n2. Create mockups\n3. Implement feature"
  }'

Insert text at a location

clawlink_call_tool --tool "googledocs_insert_text_action" \
  --params '{
    "document_id": "YOUR_DOCUMENT_ID",
    "text": "New paragraph content here.",
    "insertion_index": 150
  }'

Replace all text occurrences

clawlink_call_tool --tool "googledocs_replace_all_text" \
  --params '{
    "document_id": "YOUR_DOCUMENT_ID",
    "replace_text": "New Company Name",
    "search_text": "Old Company Name"
  }'

Copy a document

clawlink_call_tool --tool "googledocs_copy_document" \
  --params '{
    "document_id": "YOUR_DOCUMENT_ID"
  }'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm Google Docs is connected.
  2. Call clawlink_list_tools --integration google-docs to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration google-docs.
  5. If no Google Docs tools appear, direct the user to https://claw-link.dev/dashboard?add=google-docs.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  search → get → export → call                               │
│                                                             │
│  Example: Search docs → Get plaintext → Show results        │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → call                        │
│                                                             │
│  Example: Describe tool → Preview changes → User approves   │
│           → Execute update                                   │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer search, read, export, and inspection operations before writes.
  4. For document creation, content replacement, Markdown imports, structural edits, or anything marked as requiring confirmation, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • Document IDs are stable Google Drive file IDs — capture them from search or get responses for subsequent operations.
  • googledocs_insert_text_action: Use append_to_end=true to safely append without index concerns. When using insertion_index, it must fall within an existing paragraph's bounds.
  • Table operations require knowing the table index within the document structure.
  • Every document segment (body, header, footer, footnote) ends with a final newline that cannot be deleted.
  • PDF export has a 10MB content limit enforced by Google Drive API.

Error Handling

Status / ErrorMeaning
-------------------------
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration google-docs.
Missing connectionGoogle Docs is not connected. Direct the user to https://claw-link.dev/dashboard?add=google-docs.
RESOURCE_NOT_FOUNDDocument does not exist. Check the document_id.
INVALID_ARGUMENTInvalid parameter or missing required field. Review the tool schema with clawlink_describe_tool.
FORBIDDENNo read or write access to the document. Check sharing permissions.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:

```bash

openclaw plugins list

```

  1. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  2. If a fresh chat does not help, run:

```bash

openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json

openclaw gateway restart

```

  1. After restart, tell the user to send /new again and retry.

Troubleshooting: Invalid Tool Call

  1. Ensure the integration slug is exactly google-docs.
  2. Use clawlink_describe_tool to verify parameter names and types before calling.
  3. For write operations, always call clawlink_preview_tool first.

Resources

  • Google Docs API Overview
  • Documents Resource
  • ClawLink: https://claw-link.dev/?utm_source=clawhub&utm_medium=referral&utm_content=google-docs-documents
  • ClawLink Docs: https://docs.claw-link.dev/openclaw
  • ClawLink Verification: https://claw-link.dev/verify

Related Skills

  • Google Drive — For file management, permissions, and Drive-level operations
  • Google Sheets — For spreadsheet operations in Google Workspace

Powered by ClawLink — an integration hub for OpenClaw

!ClawLink Logo

版本历史

共 2 个版本

  • v1.0.5 当前
    2026-06-09 16:17 安全 安全
  • v0.1.0
    2026-05-08 02:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 457 📥 152,013
office-efficiency

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 381 📥 144,556
office-efficiency

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 927 📥 186,810