Skip to main content

Overview

The Google Docs Agent Node provides an AI agent for comprehensive Google Docs document management. This node enables:
  • Create new Google Docs documents
  • Read documents in text, JSON, or markdown format
  • Insert, append, replace, and delete text
  • Apply rich text styles (bold, italic, underline, colors, links)
  • Apply paragraph styles (headings, alignment, spacing)
  • Manage tables and insert page breaks
  • Add, list, and manage comments

Configuration Parameters

To set up the Google Docs Agent Node, authenticate with your Google account and select the tools the agent can use.

Node Configuration

  • Prompt: Define the task for the agent to perform with Google Docs.
    Create a doc titled ‘Project Plan’, insert a bold heading and add a comment
    Read the document with ID abc123 and summarize its content
    Update the document to make all section headings bold and blue
  • Tools Select which tools the Google Docs Agent can use:
    Tool nameDescription
    Create DocumentCreate a new Google Doc
    Read DocumentRead document content in text, JSON, or markdown
    Insert TextInsert text at start, end, or specific index
    Append TextAppend text to the end of the document
    Replace TextFind and replace text
    Delete RangeDelete content within a specified range
    Apply Text StyleApply bold, italic, underline, colors, links
    Apply Text Style By TextStyle specific text by finding it
    Apply Paragraph StyleApply heading styles, alignment, spacing
    List TablesList all tables in the document
    Set Table Cell TextUpdate text in table cells
    Insert Page BreakInsert a page break
    Add CommentAdd comments to the document
    List CommentsList all comments
    Reply To CommentReply to comment threads
    Resolve CommentMark comments as resolved
    Delete CommentDelete comments
    Batch UpdateExecute raw Docs API batch updates
    The agent can combine multiple operations to perform complex document editing tasks.
  • System Prompt: Customize the agent’s document editing behavior.
  • Model: Select the language model for the agent (must support function calling).
  • Max Steps: Set the maximum number of steps the agent can take (1-20).
  • Enable Model Fallbacks: Allow automatic fallback to alternative models if the primary model fails.

Expected Inputs and Outputs

  • Inputs:
    • The node accepts text input that can be referenced in the prompt using format strings.
  • Outputs:
    • output: The final result from the agent’s document operations
    • conversation: Detailed log of the agent’s editing actions

Use Case Examples

  1. Document Creation: Use the agent to create formatted documents with headings, styled text, and structured content automatically.
  2. Document Editing: Configure the agent to update existing documents, apply formatting changes, and manage document structure.
  3. Collaborative Review: Let the agent add comments, manage comment threads, and facilitate document review workflows.

Error Handling and Troubleshooting

  • Authentication Issues: If the node fails to authenticate, ensure you’ve connected your Google account and granted Google Docs permissions.
  • Document Access: Make sure you have permission to edit the documents you’re trying to modify.
  • Model Compatibility: The selected model must support function calling. Switch to a compatible model if you encounter errors.
If you encounter any issues not covered in this documentation, please reach out to our support team for assistance.

Relevant Nodes