# Google Docs — Pipedream Connect

> Use Google Docs to create, edit and collaborate on online documents.

- API slug: `google_docs` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: File Storage
- Website: https://docs.google.com
- Managed OAuth scopes: `https://www.googleapis.com/auth/drive`
- This page (HTML): https://pipedream.com/apps/google-docs
- Tools: 25 actions · 2 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: google_docs`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "google_docs",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Append Text:
const result = await mcp.callTool({
  name: "google_docs-append-text",
  arguments: {
    docId: "Document",
    text: "Text",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Google Docs endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://www.googleapis.com/drive/v3/about?fields=user

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vZHJpdmUvdjMvYWJvdXQ_ZmllbGRzPXVzZXI?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_docs-append-text",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_docs: { authProvisionId: "apn_xxxxxxx" },
    docId: "Document",
    text: "Text",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (25)

### `google_docs-append-text` — Append Text (Write)

Append text to an existing document. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/append-text.md

### `google_docs-create-document` — Create Document (Write)

Create a new Google Doc with an optional body. The body is rendered as Markdown, so you can include headings (# Title), bold/italic, bullet/numbered lists, links, and code. Optionally place the doc in a specific Drive folder. Returns {documentId, title, url}. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/create-document.md

### `google_docs-append-image` — Append Image to Document (Write)

Appends an image to the end of a document. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/append-image.md

### `google_docs-apply-bullets` — Apply Bullets (Write)

Turn paragraphs into a bulleted or numbered list in a Google Doc. Locate the paragraphs with Find Text, or pass an explicit Start Index and End Index. Every paragraph the range touches becomes a list item. Use Remove Bullets to undo. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/apply-bullets.md

### `google_docs-create-document-from-template` — Create Document From Template (Write)

Create a new Google Doc by copying a template document and substituting {{placeholder}} tokens with values. Use Find Document to resolve the template's name to its ID. Returns {documentId, title, url}. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/create-document-from-template.md

### `google_docs-create-tab` — Create Tab (Write)

Add a new tab to an existing Google Doc and return its Tab ID. The tab is created empty; pass the returned tabId as Tab ID to Insert Text, Write Table, Insert Image, Insert Table or Insert Page Break to fill it, because an edit sent without a Tab ID always goes to the document's first tab. Added at…

Full schema: https://pipedream.com/apps/google-docs/actions/create-tab.md

### `google_docs-delete-table` — Delete Table (Write)

Remove an entire table, structure and contents, from the document. Use this to clear a table completely, including an empty table left behind after its text was removed. Set Table Number to pick which table to remove (1 = first top-level table in the document, in reading order; a table nested…

Full schema: https://pipedream.com/apps/google-docs/actions/delete-table.md

### `google_docs-export-document` — Export Document (Read-only)

Export (download) a Google Doc to a file in PDF, DOCX, TXT, HTML, or ODT format. Use Find Document to resolve a document's name to its ID. The file is written to the workflow's temporary storage and a presigned download URL is returned to the caller. Returns {filePath, filename, mimeType}. See the…

Full schema: https://pipedream.com/apps/google-docs/actions/export-document.md

### `google_docs-find-document` — Find Document (Read-only)

Search for Google Docs by name or full-text content. Returns a list of {id, name, url, modifiedTime}. Use this first to resolve a document's name to its ID, then pass the id to Get Document, Export Document, or any of the insert/replace tools. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/find-document.md

### `google_docs-format-paragraph` — Format Paragraph (Write)

Apply paragraph formatting (heading style, alignment, line spacing, indentation) in a Google Doc. Locate the paragraph with Find Text, or pass an explicit Start Index and End Index. Google Docs applies paragraph styles to whole paragraphs, so every paragraph the range touches is restyled, not just…

Full schema: https://pipedream.com/apps/google-docs/actions/format-paragraph.md

### `google_docs-format-table-cell` — Format Table Cell (Write)

Set the background, borders, padding, or vertical alignment of table cells in a Google Doc. Identify the table with Find Table Text, Table Index, or leave both blank when the document has only one table. Styles every cell unless Row Index and Column Index name a starting cell. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/format-table-cell.md

### `google_docs-format-text` — Format Text (Write)

Apply character formatting (bold, italic, underline, strikethrough, font, size, color, link) to text in a Google Doc. Locate the text with Find Text, or pass an explicit Start Index and End Index. Use Find Document to resolve a document's name to its ID. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/format-text.md

### `google_docs-get-document` — Get Document (Read-only)

Get the full text content and structure of a Google Doc by its ID. Returns the document body plus a flattened textContent field for easy reading. A Google Doc can hold several tabs: body/textContent are always the first tab's content, and every tab is listed in tabs (with each tab's own textContent…

Full schema: https://pipedream.com/apps/google-docs/actions/get-document.md

### `google_docs-get-profile` — Get Profile (Read-only)

Get the identity (display name and email) of the currently authenticated Google account. Use this to answer "who am I" questions and to attribute documents to the current user. Resolves via the Drive about.get endpoint (no extra OAuth scope required). See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/get-profile.md

### `google_docs-get-tab-content` — Get Tab Content (Read-only)

Get the content of a tab in a document. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/get-tab-content.md

### `google_docs-insert-image` — Insert Image (Write)

Insert an inline image into a Google Doc from a publicly reachable image URL. The URL must be publicly accessible (Google fetches it server-side) and point to a PNG, JPEG, or GIF. Use Find Document to resolve a document's name to its ID. In a multi-tab document, set Tab ID to choose which tab…

Full schema: https://pipedream.com/apps/google-docs/actions/insert-image.md

### `google_docs-insert-page-break` — Insert Page Break (Write)

Insert a page break into a Google Doc at the beginning, end, or a specific character index. Use Find Document to resolve a document's name to its ID. In a multi-tab document, set Tab ID to choose which tab receives the page break — without it the break goes into the document's first tab; use List…

Full schema: https://pipedream.com/apps/google-docs/actions/insert-page-break.md

### `google_docs-insert-table` — Insert Table (Write)

Insert an empty table with the given number of rows and columns into a Google Doc. If you already have the data, use Write Table instead so you don't have to fill cells one by one. Use Find Document to resolve a document's name to its ID. In a multi-tab document, set Tab ID to choose which tab…

Full schema: https://pipedream.com/apps/google-docs/actions/insert-table.md

### `google_docs-insert-text` — Insert Text (Write)

Insert text into a Google Doc at the beginning, end, or a specific character index. Use Find Document to resolve a document's name to its ID. To append text to the end of a doc, use position: end (the default). In a multi-tab document, set Tab ID to choose which tab receives the text — without it…

Full schema: https://pipedream.com/apps/google-docs/actions/insert-text.md

### `google_docs-list-comments` — List Comments (Read-only)

List the comments on a Google Doc, including each comment's author, plain text and HTML content, the document text it is anchored to, whether it is resolved, and its full reply thread. Comments on a Doc are served by the Drive API, so the document ID doubles as the file ID. Use Find Document first…

Full schema: https://pipedream.com/apps/google-docs/actions/list-comments.md

### `google_docs-list-tabs` — List Tabs (Read-only)

List the tabs in a Google Doc — each tab's ID, title, position and nesting. A Google Doc can hold many tabs, and an omitted Tab ID means different things per operation: content writes (Insert Text, Insert Table, Insert Image, Insert Page Break, Write Table, Delete Table) go to the first tab…

Full schema: https://pipedream.com/apps/google-docs/actions/list-tabs.md

### `google_docs-remove-bullets` — Remove Bullets (Write)

Remove bullets or numbering from list paragraphs in a Google Doc, leaving the text in place. Locate the paragraphs with Find Text, or pass an explicit Start Index and End Index. Every paragraph the range touches is affected. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/remove-bullets.md

### `google_docs-replace-image` — Replace Image (Write)

Replace image in a existing document. Works on multi-tab documents: pass a Tab ID, or leave it blank and the tab holding the image is found automatically. See the documentation

Full schema: https://pipedream.com/apps/google-docs/actions/replace-image.md

### `google_docs-replace-text` — Replace Text (Write)

Find and replace all occurrences of a string in a Google Doc. Set Replacement Format to markdown to convert Markdown in the replacement into native Google Docs formatting. Use Find Document to resolve a document's name to its ID. Returns the number of replacements made. In a multi-tab document the…

Full schema: https://pipedream.com/apps/google-docs/actions/replace-text.md

### `google_docs-write-table` — Write Table (Write)

Create a table and fill it with data in a single step. Provide the entire table (all rows and columns, including a header row) at once. Use this instead of inserting cells or text one at a time. The action places every value in the correct cell for you. Pass Table Data as a JSON array of arrays…

Full schema: https://pipedream.com/apps/google-docs/actions/write-table.md

## Triggers (2)

### `google_docs-new-document-created` — New Document Created (Instant) (Polling)

Emit new event when a new document is created in Google Docs. See the documentation

Full schema: https://pipedream.com/apps/google-docs/triggers/new-document-created.md

### `google_docs-new-or-updated-document` — New or Updated Document (Instant) (Polling)

Emit new event when a document is created or updated in Google Docs. See the documentation

Full schema: https://pipedream.com/apps/google-docs/triggers/new-or-updated-document.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
