> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Let AI Agents Draft and Edit Google Docs

> Let agents read, create, and edit Google Docs to draft reports and documentation. OAuth tokens are injected by the gateway and never reach the agent.

> [!WARNING]
>
> **Per-app Google setup is deprecated.** All Google apps now share one Google OAuth client and one Redirect URI. To use your own client, follow the [Google setup guide](/docs/integrations/google.md). Credentials saved for one Google app apply to all of them.

## Overview

Buckle connects AI agents to Google Docs through Google's OAuth flow. Agents can read document content, create new documents, and edit existing ones. The gateway injects OAuth credentials into requests to the Google Docs API automatically.

This is useful for agents that generate reports, draft documentation, or need to read information stored in Google Docs. To manage the files themselves (search, organize, share), see [Google Drive](/docs/integrations/google-drive.md).

## What you will set up

* A Google OAuth client shared by every Google app in Buckle
* A Google Docs connection authorized with your account
* Per-agent, per-tool access, such as read-only for research agents

## Connect Google Docs

> [!NOTE]
>
> This applies on Buckle Cloud and self-hosted alike. One Google client serves every Google app in Buckle, so you set it up once. If you already did it for another Google app, skip to step 2.

> [accordion] 1. Set up your Google client
>
> Follow the [Google setup guide](/docs/integrations/google.md). It enables the Google APIs, sets up the consent screen, creates the OAuth client, and adds the Redirect URI.

> [accordion] 2. Connect Google Docs
>
> Open **Settings** > **Apps** > **Google Docs**, select **Connect Google Docs**, pick your Google account, and click **Allow**.
>
> ![Buckle connect window for Google Docs showing Configuration required, the setup guide link, and the Configure credentials button.](https://mintcdn.com/onecli-17d3f772/hJP3XqgFsBDnXHKy/images/integrations/google-docs/buckle-connect-google-docs.png?fit=max\&auto=format\&n=hJP3XqgFsBDnXHKy\&q=85\&s=2b627f0b9d1d4bae15e9de5041a2a034)
>
> The Google Docs connect window before a Google client is set up.

## What agents can do

* Read the full text content of a document
* Get document structure (headings, paragraphs, tables, lists)
* Create new documents with formatted content
* Insert, replace, or delete text in existing documents
* Add and modify tables, headers, and footers
* Apply text formatting (bold, italic, font size, color)
* Insert images and links into documents
* Read and add comments on a document

## Controlling access

Access is per agent: [grant](/docs/guides/agent-access.md) the connection to each agent that needs it, choosing per tool what runs freely, what needs human approval, and what stays blocked — a read-only agent is a single grant. Organization [rules](/docs/guides/rules.md) add guardrails on top, like rate limits and blanket blocks. Everything is checked before credential injection, so a blocked request never reaches Google Docs.

## FAQ

> [accordion] Do I need my own Google client for Docs?
>
> Yes. Follow the [Google setup guide](/docs/integrations/google.md) once. One client serves every Google app in Buckle.

> [accordion] Does the agent see my Google token?
>
> No. The token stays in Buckle, and the gateway adds it at the proxy. See [How it works](/docs/how-it-works.md).

> [accordion] Can an agent read Docs without editing?
>
> Yes. A read-only agent is a single [grant](/docs/guides/agent-access.md). To manage the files themselves, use [Google Drive](/docs/integrations/google-drive.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.