> ## 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: Google Sheets Source

> How to configure the Google Sheets component to read data in your Integrate.io ETL pipeline.

Use the **Google Sheets source component** to read data from a Google Sheets spreadsheet and ingest it into your Integrate.io ETL pipeline.

## Connection Setup

The Google Sheets source and destination components connect through a Google Cloud **service account**. When you add a new Google Sheets component, only **Google Sheets (Service Account)** connections can be selected. Components saved earlier with an OAuth **Google Sheets** connection keep that connection and still run.

### Service Account

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

**Step 1**

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

**Step 2**

On the sidebar, choose **IAM & Admin → Service Accounts → Create Service Account**.

**Step 3**

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 4**

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

**Step 5**

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 6**

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

#### Step 2: Enable the Google Sheets API

**Step 1**

In the Google Cloud Console, go to **APIs & Services → Library**.

**Step 2**

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 3: Share your spreadsheets with the service account

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

**Step 1**

Open the Google Sheets spreadsheet you want to connect to.

**Step 2**

Click **Share** in the top-right corner.

**Step 3**

Paste the service account's email address into the sharing field.

**Step 4**

Choose the access level:

* **Viewer**, for source components that only read data.
* **Editor**, for destination components that write data.

**Step 5**

Uncheck **Notify people** and click **Share**.

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

#### Step 4: Create the connection in Integrate.io ETL

**Step 1**

Click the **Connections** icon (lightning bolt) in the top-left menu.

**Step 2**

Click **New connection**.

**Step 3**

Select **Google Sheets (Service Account)**.

**Step 4**

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 5**

Click **Test Connection** to verify the credentials, then click **Create connection**.

### OAuth (REST API Only)

The OAuth **Google Sheets** connection can't be selected on new Google Sheets source or destination components. Use it to call the Google Sheets API from the [REST API source](https://www.integrate.io/docs/etl/using-components-rest-api-source.md), the [REST API destination](https://www.integrate.io/docs/etl/using-components-rest-api-destination.md), or the [API Call transformation](https://www.integrate.io/docs/etl/using-components-api-call-transformation.md). To create one:

**Step 1**

Click the **Connections** icon (lightning bolt) on the top-left menu, then click **New connection**.

**Step 2**

Select **Google Sheets**.

**Step 3**

Click **Authenticate** and, if required, sign in to Google.

**Step 4**

Click **Connect** to authorize Integrate.io ETL access to your Google Sheets account.

**Step 5**

Name the connection and click **Create Google Sheets connection**.

> [!TIP]
>
> Reconnect a connection if your password changes or the token expires. To delete a connection, click the three vertical dots on the far right of the connection listing and select **Delete connection**.

## Source Properties

The source component is configured in **Step 02** of the component editor.

![Google Sheets source component configuration](https://mintcdn.com/integrateio/vPmzup7uAj66abcx/images/creating-packages/using-components-google-sheets-source/image-1.webp?fit=max\&auto=format\&n=vPmzup7uAj66abcx\&q=85\&s=ffcf968da023351be1d9cf90f91ee734)

### Spreadsheet

Select the spreadsheet to read from. The dropdown lists all spreadsheets that have been shared with the service account. Use the search field to filter by name. If your spreadsheet is not listed, make sure it has been shared with the service account's email address. See **Step 3** under Connection Setup above.

Click the **Refresh** button to reload the spreadsheet list if you have recently shared a new spreadsheet.

### Sheet

Select the sheet (tab) within the spreadsheet to read from. The dropdown is populated automatically after a spreadsheet is selected.

### Fail the Job if the Sheet Has No Data Rows

Check **Fail the job if the sheet has no data rows** to fail the job when the selected sheet holds only a header row and no data. When it is cleared (the default), a header-only sheet is treated as a valid empty source, and downstream components receive zero records without an error.

Use this option when a downstream process expects at least one row and you would rather the run fail than complete with empty output.

## Schema

After configuring the source properties, the **Schema** section (**Step 03**) displays the fields available in the pipeline. These are derived from the header row (row 1) of the selected sheet.

* The first row of the sheet is treated as the header row and defines the column names.
* Data types are automatically inferred from sample data rows. Supported types include: `string`, `long`, `double`, `boolean`, and `datetime`.
* If a column contains mixed types or cannot be inferred, it defaults to `string`.

**The sheet must have a header row.** Sheets without headers will produce unnamed columns (e.g. `column_0`, `column_1`).

### Field selection

The Google Sheets source schema is locked to **Select all**. When you open a new source, every column from the selected sheet is loaded in its original left-to-right order. You cannot add, remove, reorder, or partially select columns.

The loader maps columns to schema fields by physical position, not by header name. Selecting a subset or reordering fields would preview correctly but silently shift values at job runtime.

You can still:

* Edit the **alias** of any field to rename it downstream.
* Change the **data type** of any field.

If your sheet layout changes, reopen the source component and click **Select all** again to refresh the schema against the current sheet columns.

## Large spreadsheets

The Google Sheets source reads large sheets in row-range batches instead of one whole-sheet request. Each batch is sized to the map task's available heap and to a per-request cell budget, so map memory and per-response payload stay bounded regardless of sheet size. This removes the out-of-memory, read-timeout, and truncated-response errors that could occur when reading multi-hundred-thousand-row sheets in a single request.

You do not need to configure anything to get this behavior. A few points to be aware of:

* The source stops paging after a long run of consecutive blank rows (default: 250,000). If your sheet has a very large intentional blank gap between data regions, rows past that gap are not read.
* Row-count limits set on the component (for example, a maximum row cap) still apply and are respected across batches.
* Very wide sheets (hundreds of columns) automatically use smaller row batches so the per-batch cell count stays within budget.

## Related

> [card] [Google Sheets Destination](https://www.integrate.io/docs/etl/using-components-google-sheets-destination.md)


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