# How to connect Google Docs to Hermes Agent (no API keys)

> Connect Google Docs to Hermes with ClawLink in one click — 33 tools your AI agent can call from chat via hosted OAuth. No API keys, no manual setup.

Web version: https://claw-link.dev/hermes/google-docs

Most guides for giving Hermes Agent Google Docs access start with registering your own OAuth app or pasting API keys into env files, then leave the token refresh and tool wiring to you. ClawLink gives Hermes a more practical Google Docs setup: pair once in the browser and your always-on Hermes agent can act on Google Docs for you, reading and doing real work on your behalf with no auth, token refresh, or tool wiring to build yourself.

**Start here — paste this into Hermes to set up ClawLink:**

> Set up ClawLink for Hermes and tell me when it's ready.
> 1. Install the plugin: `hermes plugins install ClawLink-HQ/hermes-plugin --enable`
> 2. Start pairing with `hermes clawlink begin`. It prints an approval link, so show me the link and stop, don't wait.
> 3. I'll approve it in my browser, then reply "approved".
> 4. When I say approved, finish setup: `hermes clawlink finish`
> 5. Then run `hermes clawlink test` and tell me whether ClawLink is ready.

## Setup

It takes three steps to connect Hermes to Google Docs.

1. **Install ClawLink** — add the plugin to Hermes Agent once.
2. **Connect Google Docs** — one-click OAuth in the ClawLink dashboard.
3. **Use it from chat** — ask Hermes Agent in plain English.

**Alternative for any agent (no plugin needed):** if the Hermes Agent plugin route isn't available or doesn't work, any AI agent with shell access can use the ClawLink CLI instead:

```bash
npx -y @useclawlink/cli login          # sign in via browser — no API key to paste
npx -y @useclawlink/cli connect google-docs  # connect Google Docs (browser OAuth)
npx -y @useclawlink/cli actions google-docs  # list available actions
npx -y @useclawlink/cli run google-docs <action> --input '<json>'  # execute (add --confirm for writes)
```

### Install by command

The prompt above walks Hermes through this. By hand, it is four commands and a browser approval:

```bash
hermes plugins install ClawLink-HQ/hermes-plugin --enable
hermes clawlink begin    # prints an approval link — open it and approve
hermes clawlink finish   # after approving in the browser
hermes clawlink test
```

Then connect Google Docs in the [ClawLink dashboard](https://claw-link.dev/dashboard) — a one-click OAuth approval, no API keys.

Verify the connection by asking Hermes:

> Create a Google Doc titled "Q3 Retro Notes" from this markdown and give me the document link. Use googledocs_create_document_markdown.

### Using a different agent?

The Hermes plugin is one client of ClawLink's MCP server. Claude Code, Cursor, Codex, or any agent that can run a shell command pairs with the same ClawLink account through the CLI:

```bash
npx -y @useclawlink/cli login
```

`login` opens the same browser approval and stores a credential locally. Once Google Docs is connected in the dashboard, that agent calls the same 33 Google Docs tools over MCP. Full setup for MCP clients and shell agents: [connect apps to any AI agent](https://claw-link.dev/learn/connect-apps-to-any-ai-agent).

## Google Docs MCP for Hermes

Looking for a Google Docs MCP server for Hermes Agent? ClawLink connects Google Docs to Hermes Agent and exposes 33 Google Docs tools your agent can call over [MCP](https://claw-link.dev/learn/what-is-an-mcp-server), with [hosted auth](https://claw-link.dev/learn/oauth-for-ai-agents) and nothing to run or maintain yourself. Using OpenClaw instead? The [OpenClaw Google Docs integration](https://claw-link.dev/openclaw/google-docs) works the same way.

The manual route the search engines teach starts in the Google Cloud Console: create a project, enable the Docs API and the Drive API, create Desktop OAuth credentials, download the client secret JSON, and run a setup command that leaves a token.json file on your machine. None of those steps exist here. The ClawLink connection is one browser consent screen, the tools below work from the next message, and there is no token file anywhere to delete when something goes wrong. Google's own Docs MCP server and the community google_workspace_mcp repo both need the Cloud project version; this page is the route that does not.

## The other ways Hermes Agent gets Google Docs

All of them except this page start with a Google Cloud project.

- **Hermes's own google-workspace skill**: the flow the AI Overview teaches, and the only one with native Hermes branding. Create a Cloud project, enable the Docs and Drive APIs, create a Desktop OAuth client, download the client secret JSON, and run the skill's setup command. One grant covers Gmail, Drive, Sheets, and Docs together.
- **Google's remote Docs MCP server** (docsmcp.googleapis.com/mcp/v1): two tools, read_doc and update_doc, in Developer Preview. Requires a Cloud project, enabling docsmcp.googleapis.com, and an OAuth client id and secret.
- **The community google_workspace_mcp server**: the GitHub repo the AI Overview names as the best MCP server for Google Workspace. Same Cloud project and OAuth client setup, run locally.
- **Composio**: the config-file route. Install their CLI, add a Connect MCP URL and API key to ~/.hermes/config.yaml. Works, but it is the setup this page exists to remove.
- **ClawLink (this page)**: 33 tools, key stored server-side as an OAuth grant, nothing running on your machine.

Using OpenClaw as well? The [OpenClaw Google Docs integration](https://claw-link.dev/openclaw/google-docs) is the same hosted OAuth setup with the same tool set.

## What the Hermes Agent Google Docs integration can do

33 Google Docs tools are ready for Hermes Agent once the account is connected. The 26 below are the ones people reach for most; your agent can call all 33.

### 26 of 33 Google Docs tools for Hermes

| Tool | What it does |
|---|---|
| **Create document** `googledocs_create_document` | Create a new Google Docs document |
| **Create document markdown** `googledocs_create_document_markdown` | Create a Google Docs document from Markdown |
| **Export document as PDF** `googledocs_export_document_as_pdf` | Export a Google Docs document as PDF |
| **Get document by ID** `googledocs_get_document_by_id` | Get Google Docs document metadata and structure |
| **Get document plaintext** `googledocs_get_document_plaintext` | Get the plain text content of a Google Docs document |
| **Insert inline image** `googledocs_insert_inline_image` | Insert an inline image into a Google Docs document |
| **Insert page break** `googledocs_insert_page_break` | Insert a page break into a Google Docs document |
| **Insert table action** `googledocs_insert_table_action` | Insert a table into a Google Docs document |
| **Insert text action** `googledocs_insert_text_action` | Insert text at a specific position in a Google Docs document |
| **Replace all text** `googledocs_replace_all_text` | Replace matching text everywhere in a Google Docs document |
| **Search documents** `googledocs_search_documents` | Search Google Docs documents in Drive |
| **Update document markdown** `googledocs_update_document_markdown` | Update a Google Docs document from Markdown |
| **Update existing document** `googledocs_update_existing_document` | Update content in an existing Google Docs document |
| **List spreadsheet charts** `googledocs_list_spreadsheet_charts` | Retrieve a list of all charts from a specified Google Sheets spreadsheet |
| **Copy document** `googledocs_copy_document` | Create a copy of an existing Google Document |
| **Create footer** `googledocs_create_footer` | Create a new footer in a Google Document |
| **Create footnote** `googledocs_create_footnote` | Create a new footnote in a Google Document |
| **Create header** `googledocs_create_header` | Create a new header in a Google Document, optionally with text content |
| **Create named range** `googledocs_create_named_range` | Create a new named range in a Google Document |
| **Create paragraph bullets** `googledocs_create_paragraph_bullets` | Add bullets to paragraphs within a specified range in a Google Document |
| **Insert table column** `googledocs_insert_table_column` | Insert a new column into a table in a Google Document |
| **Replace image** `googledocs_replace_image` | Replace a specific image in a document with a new image from a URI |
| **Unmerge table cells** `googledocs_unmerge_table_cells` | Unmerge previously merged cells in a table |
| **Update document section markdown** `googledocs_update_document_section_markdown` | Insert or replace a section of a Google Docs document with Markdown content |
| **Update document style** `googledocs_update_document_style` | Update the overall document style, such as page size, margins, and default text direction |
| **Update table row style** `googledocs_update_table_row_style` | Update the style of a table row in a Google Document |

## Example prompts

**Create a document from markdown**

> Create a Google Doc titled "Q3 Retro Notes" from this markdown and give me the document link. Use googledocs_create_document_markdown.

**Search then read**

> Use googledocs_search_documents for the draft proposal we discussed last month, take the top result's id, then read it with googledocs_get_document_plaintext and summarize it in five bullets.

**Replace text everywhere**

> In the document I just named, replace all instances of the old product name with the new one using googledocs_replace_all_text, then confirm how many replacements were made.

**Export a PDF**

> Export the meeting notes document to PDF with googledocs_export_document_as_pdf using its document id as file_id, and tell me the download link.

## Google Docs tool arguments Hermes gets wrong

These are the argument shapes we see fail in production, with names read from the live tool schemas. Two of them fail because the schema is inconsistent, not because the agent is wrong.

- **`googledocs_create_document_markdown` requires only `title`.** The live schema marks title as the sole required field; `markdown_text` is optional and accepts `content` as an alias. An agent that withholds the title fails with `arguments.title is required` (2 production occurrences), while the markdown body can almost always wait.
- **Argument casing changes between tools.** `googledocs_insert_inline_image` takes camelCase `documentId` plus `uri` and `location`, while `googledocs_replace_all_text` and `googledocs_get_document_plaintext` take snake_case `document_id`. Copying arguments from one call into the next is why we log both `arguments.documentId is required` and `arguments.document_id is required` against the same integration.
- **`googledocs_insert_inline_image` needs a public direct image URL.** The schema says the `uri` must be a publicly accessible direct image URL, not a redirect or a Google Drive preview page. Agents pick Drive viewer links or signed URLs, the insert fails with a 403 or invalid-argument, and the fix is a hosted file URL, not a reconnect.
- **`googledocs_search_documents` takes plain text, not a Drive query.** `query` is a free-text search of document content, and the schema also exposes `max_results` (1-100, default 10), `include_trashed` (default false) and `include_shared_drives` (default true). It is the most-used tool in production (119 of 552 calls) and the one whose results feed every other tool a document id.
- **`googledocs_replace_all_text` is case-insensitive unless you say otherwise.** `match_case` defaults to false, so a replace of "Q3 report" rewrites "q3 report" and "Q3 Report" too. `search_by_regex` is off by default and treats `find_text` literally when enabled.
- **One Markdown table per call.** `googledocs_create_document_markdown` and `googledocs_update_document_markdown` reject payloads with multiple tables with a Google Docs API limitation error; production logs five variants of it (2, 4, 12 and 15 tables in one call). Split multi-table markdown into separate section updates.
- **Markdown write tools are confirmation-gated.** `googledocs_create_document_markdown` and `googledocs_update_document_markdown` return `requires explicit confirmation before execution` (4 production occurrences). That is a safety gate, not a failure: the agent asks once and the retry with confirmation succeeds.
- **`googledocs_export_document_as_pdf` wants the document id as `file_id`.** The schema requires `file_id` (the same 44-character id the other tools take as `document_id`) and treats `filename` as optional, so an agent that refuses to send a name still gets the PDF.

## ClawLink vs. building it yourself

The alternative to ClawLink is usually manual OAuth app setup plus your own token handling, permission troubleshooting, and tool plumbing for Hermes Agent. That is fine if you want to build and maintain the integration yourself. Most teams just want Google Docs working from chat.

| | Manual | ClawLink |
|---|---|---|
| **Connection flow** | Register a Google Docs app, configure redirect URLs, manage consent details, and reconnect users when auth settings drift. | Users connect Google Docs through the hosted browser flow and ClawLink keeps the token lifecycle out of your app code. |
| **Ongoing maintenance** | You own refresh logic, permission debugging, environment config, and every provider-specific edge case for Google Docs. | ClawLink handles the repetitive integration plumbing so your team can focus on the workflow instead of the infrastructure. |
| **Agent usability** | You still need to expose the right Google Docs actions to the runtime in a format your agent can reliably use. | 33 tools for Google Docs are already exposed through ClawLink, so the agent can read and act from chat immediately. |

## ClawLink vs. Composio

Composio also exposes Google Docs to AI agents. It is developer infrastructure: Python and TypeScript SDKs, an MCP server, and a catalog past 1,000 apps, aimed at teams shipping agent products. ClawLink is built for Hermes Agent users instead. You install the plugin once, connect Google Docs in the browser, and the 33 tools above work from chat. There is no SDK, no config file, and no API key handling. Choosing between them? Read the full [Composio alternatives](https://claw-link.dev/hub/composio-alternatives) comparison.

### Hermes paired but still can't use Google Docs
Pairing is a two-step handshake: run `hermes clawlink begin`, approve the link in your browser, then run `hermes clawlink finish`. If you ran finish before approving, or the approval link expired, run `hermes clawlink begin` again to get a fresh link. Confirm the plugin was installed with `--enable`, then verify with `hermes clawlink test`.

### Connection succeeds but no tools appear
Reconnect Google Docs from the dashboard, then start a fresh chat if the runtime still has the old tool catalog loaded.

### "Tool schema not loaded yet" error when calling Google Docs tools
Google Docs tool schemas load on demand the first time a tool runs and are cached after that, so this error usually clears on its own: wait a few seconds and retry the same request. If every Google Docs call keeps failing with it in a fresh chat, reconnect from the dashboard, and contact support if it still persists — that pattern points to a configuration problem on our side, not something you can fix by reconnecting again.

### Google Docs returns 403 or "permission denied" on one action while others work
Two usual causes. The connected account may not have access to the specific workspace, inbox, store, or project in the request — check that first. If access looks right, the agent may have sent a placeholder value (like "YOUR_ID" or an example id from documentation) instead of a real one: ask it to run a list or search tool first, then retry the action with a real id from those results. Most failures at this stage are one of these two, not ClawLink bugs.

### arguments.document_id is required
The agent sent the document id under a different name, most commonly `id` or `documentId`. The read and replace tools on this page (`googledocs_get_document_plaintext`, `googledocs_replace_all_text`, `googledocs_copy_document`) all take snake_case `document_id`, while `googledocs_insert_inline_image` takes camelCase `documentId`. The same value, different key. Ask the agent to read the tool's argument list before retrying; ClawLink returns the exact required field name in the error.

### arguments.id is required
This is the same placeholder trap as the document_id error, one level up: the agent sent a bare `id` argument when the tool schema names the field `document_id` (or `file_id` on the export tool). It is the single most common failure on this integration, eight occurrences in production. One run of the list or search tool first, then retry with the real field name, clears it.

### Request had insufficient authentication scopes.
The connection asks Google for three scopes: drive, documents, and userinfo.email, which covers every tool on this page. A 403 with this message means the token actually granted is narrower than requested, which happens when a checkbox is cleared on Google's consent screen or the flow finishes against a different account. The advice search engines give for this error does not apply here: there is no token.json to delete, because ClawLink holds the grant server side. Reconnect Google Docs from the dashboard and approve every permission Google shows. Two occurrences across 552 production calls, so check per-file sharing before reconnecting.

### Tool 'googledocs_list_documents' not found
The tool exists under a different name: document search is `googledocs_search_documents`. The same miss appears as `Tool 'googledocs_get_document' not found` (the real names are `googledocs_get_document_by_id` and `googledocs_get_document_plaintext`) and `Tool 'googledocs_export_file' not found` (the real name is `googledocs_export_document_as_pdf`). ClawLink returns a "Did you mean" line with the closest matches on every miss; tell the agent to retry with a name from that line.

### Permission denied for document with id '\\<id>'. The connected account does not have access to this document.
Access is per-file, not per-connection. Google Docs has no sharing API of its own; sharing is a Drive permission, so a document the connected Google account was never added to stays invisible no matter how many times you reconnect. Share the document with the connected account (or move it into a shared drive the account can reach) and the same call succeeds. Two production failures carry this shape, one on insert_text_action with a 403 from the caller-not-in-permission-list reason.

### Failed to retrieve document with id '\\<id>'. Status: FAILED_PRECONDITION. Message: This operation is not supported for this document
The id is real and the account has access; the file is not a Docs document. This fires when a Google Sheets, Forms, or other non-Docs file id is passed to a docs tool, because the Docs API cannot read those file types. Ask the agent to confirm the file type before passing the id, or route the call to the matching integration (sheets for spreadsheets). Two occurrences in production, both on file ids that resolve to non-document files.

### OAuth finished in the browser but the account is still missing
Try reconnecting Google Docs and complete the consent flow in the same browser session. Partial OAuth approvals or switching accounts mid-flow can leave the connection incomplete.

### Is there a Hermes Agent Google Docs integration?
Yes. ClawLink is the fastest way to connect Hermes to Google Docs: link your Google Docs account once in the browser and Hermes Agent can call the Google Docs API through 33 ready-made tools — no custom code or token handling.

### How do I connect Google Docs to Hermes with ClawLink?
Install the plugin with `hermes plugins install ClawLink-HQ/hermes-plugin --enable`, then pair once: run `hermes clawlink begin`, approve the link in your browser, and run `hermes clawlink finish`. Connect Google Docs in the dashboard and Hermes can use it from the next message — no config files or API keys to manage.

### How long does it take to connect Google Docs to Hermes Agent?
About two minutes. Sign in, click Connect next to Google Docs in the dashboard, authenticate, and Hermes Agent can use it from the next chat message.

### Why use ClawLink instead of wiring Google Docs up myself?
The alternative to ClawLink is usually manual OAuth app setup plus your own token handling, permission troubleshooting, and tool plumbing for Hermes Agent. That is fine if you want to build and maintain the integration yourself. Most teams just want Google Docs working from chat.

### Do I need a Google Cloud project to connect Google Docs to Hermes Agent?
Not with ClawLink. Every route the search engines teach starts in the Cloud Console: create a project, enable the Docs API and Drive API, create Desktop OAuth credentials, download the client secret JSON. ClawLink runs that OAuth application for you, so you approve Google's consent screen in the browser and the 33 tools work from the next message. No Cloud project, no client secret on your machine, no token.json to keep alive.

### What Google permissions does the Google Docs connection request?
Three scopes: `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/documents`, and `https://www.googleapis.com/auth/userinfo.email`. That is enough to read, create, and edit documents, and to search them through Drive. The grant shows up under Third-party apps and services in your Google account, and one click at myaccount.google.com/permissions ends it.

### Why can Hermes find my document but then get a permission error on it?
Searching and editing are different permissions. `googledocs_search_documents` returns documents from Drive, including ones merely visible to the account; editing one requires the account to be an editor on that specific file. Google Docs has no sharing API, so a document never shared with the connected account stays read-blocked. Share the document with the connected account, or make the agent verify access with `googledocs_get_document_by_id` before writing.

### Is there an official Google Docs MCP server?
Yes, and it needs a Cloud project. Google's remote Docs MCP server runs at docsmcp.googleapis.com/mcp/v1 with two tools (read_doc, update_doc); configuring it means creating a project, enabling docsmcp.googleapis.com and the Docs API, and creating an OAuth client id and secret. The same Google Cloud + OAuth client setup is what the community google_workspace_mcp server requires. ClawLink is the route that skips the project entirely.

### How do I test the Google Docs integration in Hermes Agent?
Run `hermes clawlink test` to confirm the plugin is paired, then ask Hermes to "create a Google Doc from this markdown and show me the link". A document link back in chat means the connection works end to end. To confirm access on an existing document, ask for its plaintext with `googledocs_get_document_plaintext`.

### Hermes paired but still can't use Google Docs
Pairing is a two-step handshake: run `hermes clawlink begin`, approve the link in your browser, then run `hermes clawlink finish`. If you ran finish before approving, or the approval link expired, run `hermes clawlink begin` again to get a fresh link. Confirm the plugin was installed with `--enable`, then verify with `hermes clawlink test`.

## Related

- [Google Classroom](https://claw-link.dev/hermes/google-classroom) — Manage classes, coursework, and students
- [Google Calendar tools](https://claw-link.dev/hermes/google-calendar) — Create and manage calendar events
- [Hermes Google Sheets integration](https://claw-link.dev/hermes/google-sheets) — Read and write spreadsheet data
