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

# ETL: Connecting to Google Sheets (Service Account)

> Connect Google Sheets to Integrate.io ETL using a Google Cloud service account key. Configure spreadsheet sharing and create the connection for pipelines.

Integrate.io ETL can access your Google Sheets data using a Google Cloud **service account**. This method is recommended when you want to avoid user-based OAuth, share access across a team, or connect spreadsheets owned by a workspace rather than an individual user.

Use this guide to:

1. Create a service account in Google Cloud and generate a JSON key.
2. Enable the Google Sheets API for your project.
3. Share the spreadsheets you want to read from or write to with the service account.
4. Create the Google Sheets (Service Account) connection in Integrate.io ETL.

For the user-based OAuth version of this connector, see [ETL: Connecting to Google Sheets](/etl/allowing-integrateio-etl-access-to-my-data-on-google-sheets).

## Prerequisites

* A Google Cloud project where you can create service accounts.
* Owner or Editor access on the spreadsheets you want to share with the service account.
* Permission to create connections in your Integrate.io account.

## Step 1: Create a service account and JSON key

<Steps>
  <Step>
    Access your [Google Cloud Console](https://console.cloud.google.com/) and select the project you want to use.
  </Step>

  <Step>
    On the sidebar, choose **IAM & Admin → Service Accounts → Create Service Account**.
  </Step>

  <Step>
    Fill in the **Service account name** (for example, `integrateio-google-sheets`) and click **Done**. Roles are not required at the project level for Google Sheets; access is granted per spreadsheet in Step 3.
  </Step>

  <Step>
    From the **Service Accounts** list, click the service account you just created and open the **Keys** tab.
  </Step>

  <Step>
    Click **Add Key → Create new key**, choose **JSON**, and click **Create**. A `.json` key file is downloaded to your machine. Keep this file secure. You will upload it to Integrate.io in Step 4.
  </Step>

  <Step>
    Copy the service account's email address (it ends in `@<project-id>.iam.gserviceaccount.com`). You will need it in Step 3.
  </Step>
</Steps>

## Step 2: Enable the Google Sheets API

<Steps>
  <Step>
    In the Google Cloud Console, go to **APIs & Services → Library**.
  </Step>

  <Step>
    Search for **Google Sheets API** and click **Enable**. If you plan to let Integrate.io list spreadsheets by name, also enable the **Google Drive API**.
  </Step>
</Steps>

## Step 3: Share your spreadsheets with the service account

The service account can only access spreadsheets that have been explicitly shared with it.

<Steps>
  <Step>
    Open the Google Sheets spreadsheet you want to connect to.
  </Step>

  <Step>
    Click **Share** in the top-right corner.
  </Step>

  <Step>
    Paste the service account's email address into the sharing field.
  </Step>

  <Step>
    Choose the access level:

    * **Viewer**, for source components that only read data.
    * **Editor**, for destination components that write data.
  </Step>

  <Step>
    Uncheck **Notify people** and click **Share**.
  </Step>
</Steps>

Repeat this step for every spreadsheet that should be available to Integrate.io.

## Step 4: Create the Google Sheets (Service Account) connection in Integrate.io ETL

<Steps>
  <Step>
    Click the **Connections** icon (lightning bolt) in the top-left menu.
  </Step>

  <Step>
    Click **New connection**.
  </Step>

  <Step>
    Select **Google Sheets (Service Account)**.
  </Step>

  <Step>
    Name the connection and upload the JSON key file you downloaded in Step 1. The service account email is filled in automatically from the key file.
  </Step>

  <Step>
    Click **Test Connection** to verify the credentials.
  </Step>

  <Step>
    Click **Create connection**.
  </Step>
</Steps>

## Modifying or deleting the connection

<Steps>
  <Step>
    Click the **Connections** icon (lightning bolt) in the top-left menu.
  </Step>

  <Step>
    Click a connection to update its name or upload a new JSON key (for example, after rotating the key in Google Cloud).
  </Step>

  <Step>
    To delete the connection, click the three vertical dots on the far right of the connection listing and select **Delete connection**. Deleting the connection in Integrate.io does not remove the service account or its key in Google Cloud. Delete the key from the service account's **Keys** tab in Google Cloud if you no longer need it.
  </Step>
</Steps>

## Troubleshooting

* **Spreadsheet not listed in the component dropdown.** Confirm the spreadsheet is shared with the service account email from Step 1 and that the Google Sheets API (and Google Drive API, if used) is enabled on the project. Click **Refresh** in the component to reload the list.
* **`403: The caller does not have permission`.** The spreadsheet has not been shared with the service account, or the shared access level is lower than required (Editor is needed for write operations).
* **`API has not been used in project ... before or it is disabled`.** Enable the Google Sheets API (and Google Drive API, if applicable) in the same project that owns the service account.

## Related

<CardGroup cols={2}>
  <Card title="Google Sheets Source" icon="arrow-right" href="/etl/using-components-google-sheets-source" horizontal />

  <Card title="Google Sheets Destination" icon="arrow-right" href="/etl/using-components-google-sheets-destination" horizontal />
</CardGroup>
