> ## 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.

# GSheet

> Integrate your application with the Google Sheets API

## 🚀 Quickstart

Connect to Google Sheets 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* -> *GSheet*.

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

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

  <Step title="Call the Google Sheets API">
    Let's make your first request to the Google Sheets API (fetch a specific spreadsheet). 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/v4/spreadsheets/{sheetId}" \
          -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: '/v4/spreadsheets/{sheetId}',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(JSON.stringify(res.data, 2, null));
        ```
      </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 `{sheetId}` in the URL represents the `ID` of the spreadsheet 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 Sheets Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Google Sheets OAuth app](/api-integrations/google-sheet/how-to-register-your-own-google-sheet-api-oauth-app)\
  Register an OAuth app with Google 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 Sheets API](https://developers.google.com/sheets/api/reference/rest)

## 🧩 Pre-built syncs & actions for Google Sheets

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

### Developer Metadata

| Function name               | Description                           | Type                                         | Source code                                                                                                                            |
| --------------------------- | ------------------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `search-developer-metadata` | Search developer metadata by criteria | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/search-developer-metadata.ts) |

### Sheets

| Function name                  | Description                                        | Type                                           | Source code                                                                                                                               |
| ------------------------------ | -------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `append-values-to-spreadsheet` | Append values to the end of a spreadsheet table    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/append-values-to-spreadsheet.ts) |
| `copy-sheet`                   | Copy a sheet to another spreadsheet                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/copy-sheet.ts)                   |
| `create-column`                | Insert a new column into a sheet                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/create-column.ts)                |
| `get-values`                   | Get values from a spreadsheet range                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/get-values.ts)                   |
| `upsert-row`                   | Append or update a row of values in a Google Sheet | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/upsert-row.ts)                   |
| `rows`                         | Sync worksheet rows from a Google Sheet            | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/syncs/rows.ts)                           |

### Spreadsheets

| Function name                    | Description                                                 | Type                                         | Source code                                                                                                                                 |
| -------------------------------- | ----------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `batch-get-values`               | Get values from multiple ranges                             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/batch-get-values.ts)               |
| `batch-update-spreadsheet`       | Apply multiple updates to a spreadsheet in a single request | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/batch-update-spreadsheet.ts)       |
| `create-spreadsheet-row`         | Insert a new row at a given index in a Google Sheet         | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/create-spreadsheet-row.ts)         |
| `create-spreadsheet`             | Create a new spreadsheet                                    | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/create-spreadsheet.ts)             |
| `get-spreadsheet-by-data-filter` | Get spreadsheet data matching data filters                  | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/get-spreadsheet-by-data-filter.ts) |
| `update-conditional-format-rule` | Update or move a conditional format rule                    | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/update-conditional-format-rule.ts) |
| `update-values`                  | Update values in a spreadsheet range                        | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/update-values.ts)                  |

### Values

| Function name                       | Description                                                                  | Type                                         | Source code                                                                                                                                    |
| ----------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `batch-clear-values-by-data-filter` | Clear values from ranges matching data filters, preserving formatting        | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/batch-clear-values-by-data-filter.ts) |
| `batch-clear-values`                | Clear values from one or more ranges in a spreadsheet, preserving formatting | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/batch-clear-values.ts)                |
| `batch-get-values-by-data-filter`   | Get values from ranges matching data filters                                 | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/batch-get-values-by-data-filter.ts)   |
| `clear-values`                      | Clear values from a range, preserving formatting                             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/clear-values.ts)                      |

### Worksheets

| Function name      | Description                                          | Type                                           | Source code                                                                                                                   |
| ------------------ | ---------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `delete-worksheet` | Delete a worksheet by name from a Google Spreadsheet | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/actions/delete-worksheet.ts) |
| `worksheets`       | Sync worksheets from a Google Sheets spreadsheet     | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-sheet/syncs/worksheets.ts)         |

***
