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

# Google Docs

> Integrate your application with the Google Docs API

## 🚀 Quickstart

Connect to Google Docs with Nango and see data flow in 2 minutes.

**1. Create an integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Google Docs*. Nango doesn't have a Nango-managed OAuth app for Google Docs yet. You'll need to set up your own by following the setup guide linked below. After that, make sure to add the OAuth client ID, secret, and scopes in the integration settings in Nango.

**2. Authorize Google Docs**

Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to Google Docs. Later, you'll let your users do the same directly from your app.

**3. Call the Google Docs API**

Let's make your first request to the Google Docs API (fetch a specific document). Replace the placeholders below with your [Environment API key](https://nango.dev/docs/reference/backend/http-api/api-keys.md), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl "https://api.nango.dev/proxy/v1/documents/{documentId}" \
>   -H "Authorization: Bearer <NANGO-API-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>"
> ```

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
>
> const res = await nango.get({
>     endpoint: '/v1/documents/{documentId}',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>'
> });
>
> console.log(JSON.stringify(res.data, null, 2));
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

> [!NOTE]
>
> The `{documentId}` in the URL represents the `ID` of the document to retrieve.

✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/primitives/auth.md) to integrate Nango in your app.

To obtain your own credentials, follow the setup guide linked below.

## 📚 Google Docs Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Google Docs OAuth app](https://nango.dev/docs/api-integrations/google-docs/how-to-register-your-own-google-docs-api-oauth-app)\
  Register an OAuth app with Google Docs and obtain credentials to connect it to Nango

* [Google App & Security Review](https://nango.dev/docs/api-integrations/google-shared/google-security-review)
  Pass Google's OAuth app verification to go to production

Official docs: [Google Docs API documentation](https://developers.google.com/workspace/docs/api/reference/rest)

## 🧩 Pre-built syncs & tools for Google Docs

Explore Nango-provided tools in your dashboard. Extend and customize them to fit your needs.

### Others

| Function name | Description | Type |
| - | - | - |
| `add-document-tab` | Add a new document tab to an existing Google Doc. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-document` | Create a blank Google Doc with a title | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-footer` | Create a footer in a document section | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-footnote` | Insert a footnote at a body location. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-header` | Create a header in a document section. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-named-range` | Create a named range over a text range. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-paragraph-bullets` | Apply a bullet or numbered list preset to paragraphs in a range. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-content-range` | Delete text or other removable content from a range in a Google Doc. The range must be structurally valid: it cannot span table cells, section breaks, or the final newline of a segment (body, header, or footer). | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-document-tab` | Delete a document tab by tab ID. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-footer` | Delete a footer by footer ID. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-header` | Delete a header by header ID. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-named-range` | Delete a named range by ID or by name. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-paragraph-bullets` | Remove bullets or numbering from paragraphs in a range. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-table-column` | Delete a table column using a reference cell. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-table-row` | Delete a table row using a reference cell. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `export-document` | Export a Google Doc to PDF, DOCX, HTML, or plain text. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `insert-inline-image` | Insert an inline image from a public URL. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `insert-page-break` | Insert a page break in the document body. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `insert-section-break` | Insert a section break in the document body. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `insert-table-column` | Insert a table column to the left or right of a reference cell. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `insert-table-row` | Insert a table row above or below a reference cell. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `insert-table` | Insert a table with a given row and column count. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `insert-text` | Insert text at an index or at the end of a segment. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-revisions` | List the revision history for a Google Doc. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `merge-table-cells` | Merge a rectangular range of table cells in a Google Doc | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `pin-table-header-rows` | Pin or unpin a number of rows as frozen headers in a table. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `replace-all-text` | Replace all matches of a string or regex in a document. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `replace-image` | Replace an existing inline or positioned image with a new image from a URL. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `replace-named-range-content` | Replace the contents of a named range in a Google Doc. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `unmerge-table-cells` | Unmerge previously merged table cells in a Google Doc. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-document-style` | Update document-level page and margin styling. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-document-tab-properties` | Rename or move a document tab. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-paragraph-style` | Update alignment, heading, spacing, or indentation for paragraphs in a range. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-section-style` | Update section-level layout settings. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-table-cell-style` | Update background, borders, padding, or alignment for table cells. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-table-column-properties` | Update widths for one or more table columns. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-table-row-style` | Update minimum height or related row styling for table rows. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-text-style` | Update bold, italic, links, colors, font, or size for text in a range. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `document-content-by-id` | Sync full document structure and content for document IDs supplied in connection metadata | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `documents-from-drive-folders` | Discover Google Docs files under folder IDs from metadata, then hydrate each document through the Docs API. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `documents-from-drive-query` | Discover Google Docs files with a Drive search query, then sync each document content | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `documents-from-shared-drives` | Discover Google Docs files across shared drives and hydrate each document through the Docs API | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `recent-documents` | Sync recently modified Google Docs files from Drive and fetch current document content for each changed file. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

***


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