> ## Documentation Index
> Fetch the complete documentation index at: https://nango-wari-migrated-bigcommerce-docs.mintlify.site/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.

<Steps>
  <Step title="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*.

    <Note>
      Nango has credentials you can use for testing. Activate them in the dashboard.
    </Note>
  </Step>

  <Step title="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.
  </Step>

  <Step title="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 [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

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

      <Tab title="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({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.get({
            endpoint: '/v1/documents/{documentId}',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(JSON.stringify(res.data, null, 2));
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    <Note>
      The `{documentId}` in the URL represents the `ID` of the document to retrieve.
    </Note>

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

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/primitives/auth) to integrate Nango in your app.

    To obtain your own production credentials, follow the setup guide linked below.
  </Step>
</Steps>

## 📚 Google Docs Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Google Docs OAuth app](/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](/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 & actions for Google Docs

Enable them in your dashboard. Extend and customize to fit your needs.

### Others

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

***
