Saltar al contenido principal

Google Docs

The Google Docs toolkit lets agents read and edit Google Documents, search Drive for Docs, create documents (including from templates), apply formatting, and insert tables or page breaks. Authentication is per-user OAuth — each user connects their own Google account.

Add it on the agent Toolkits tab. The first use prompts the user to connect Google if they have not already. Docs shares the Google Workspace OAuth connection with Gmail, Drive, Sheets, Calendar, and related Google toolkits.

Prerequisites​

  • A Google account with access to the Docs the agent should use
  • An agent you can edit
  • Google OAuth configured for your organization (admin)
  • Users who will chat with the agent must complete the Google OAuth connect flow when prompted

Setup​

  1. Open the agent → Toolkits → add Google Docs.
  2. Optionally enable or disable individual tools in toolkit config.
  3. Save the agent. In Chat, connect Google when prompted.
  4. @-mention Docs tools in the personality prompt for document read/write tasks.

Available tools​

ToolDescription
Read DocumentReads document content as text, JSON, or markdown (optional max length).
Search DocsSearches Google Docs via Drive (natural language or Drive query syntax).
Insert TextInserts text at a 1-based index position.
Append TextAppends text at the end of the document (optional newline).
Delete RangeDeletes content between start and end indexes.
Apply Text StyleApplies bold, italic, underline, strikethrough, font, size, colors, or links.
Apply Paragraph StyleApplies headings (1–6), alignment, and spacing.
Insert TableInserts a table at an index (rows × columns).
Insert Page BreakInserts a page break at an index.
Create DocumentCreates a new Doc with optional initial content.
Create from TemplateCopies a template Doc and optionally replaces placeholder text.
Delete DocumentMoves a Doc to trash (default) or permanently deletes it.

Use cases​

  • Summarize or extract sections from a shared policy or brief
  • Draft a new Doc from chat, then append revisions
  • Clone a template and fill placeholders for proposals or reports
  • Search Drive for Docs by topic before editing

Tips​

  • Index positions follow the Google Docs API (1-based).
  • Search, create, template copy, and delete use Drive — the connected user needs Drive access to those files.
  • Markdown export is best-effort (headings, lists, bold/italic, links, basic tables).
  • Access is limited to what the connected Google user can open — not a shared service account unless that account connects.
  • For spreadsheets, files, or slides, use Google Sheets, Google Drive, or Google Slides.

Troubleshooting​

SymptomWhat to check
Google OAuth not connectedComplete the Google connect prompt; try disconnecting and connecting again
Permission denied on a DocShare the Doc with the connected Google account, or reconnect with the right account
Search returns nothingConfirm the files are Google Docs the user can access; try a broader query
Insert/delete at wrong placeRecheck 1-based indexes from a fresh Read Document
Template create failsConfirm template Doc ID and that the user can copy it in Drive