Google Sheets
Set up the Google Sheets source connector.
Sync modes, namespaces and the columns Pipeloom adds are explained once in Connector concepts; workspace variables and custom components in Orchestration.
This page contains the setup guide and reference information for the Google Sheets source connector.
:::info The Google Sheets source connector pulls data from a single Google Sheets spreadsheet. Each sheet within a spreadsheet can be synced. To sync multiple spreadsheets, use our Google Drive connector or set up multiple Google Sheets source connectors in your Pipeloom instance. No other files in your Google Drive are accessed. :::
Prerequisites
-
Spreadsheet Link - The link to the Google spreadsheet you want to sync.
-
For Pipeloom:
- A GCP project
- Enable the Google Sheets API in your GCP project
- Service Account Key with access to the Spreadsheet you want to replicate
Setup guide
The Google Sheets source connector supports authentication via either OAuth or Service Account Key Authentication.
Step 1: Set up Google Sheets
For Pipeloom:
We recommend using Service Account Key Authentication. Follow the steps below to create a service account, generate a key, and enable the Google Sheets API.
:::note
If you prefer to use OAuth for authentication with Pipeloom, you can follow Google's OAuth instructions to create an authentication app. Be sure to set the scopes to https://www.googleapis.com/auth/spreadsheets.readonly and https://www.googleapis.com/auth/drive.readonly. You will need to obtain your client ID, client secret, and refresh token for the connector setup.
:::
Set up the service account key
Create a service account
- Open the Service Accounts page in your Google Cloud console.
- Select an existing project, or create a new project.
- At the top of the page, click + Create service account.
- Enter a name and description for the service account, then click Create and Continue.
- Under Service account permissions, select the roles to grant to the service account, then click Continue. We recommend the Viewer role.
Generate a key
- Go to the API Console/Credentials page and click on the email address of the service account you just created.
- In the Keys tab, click + Add key, then click Create new key.
- Select JSON as the Key type. This will generate and download the JSON key file that you'll use for authentication. Click Continue.
Enable the Google Sheets API
- Go to the API Console/Library page.
- Make sure you have selected the correct project from the top.
- Find and select the Google Sheets API.
- Click ENABLE.
If your spreadsheet is viewable by anyone with its link, no further action is needed. If not, give your Service account access to your spreadsheet.
Set up the Google Sheets connector in Pipeloom
For Pipeloom:
-
Navigate to the Pipeloom dashboard.
-
Click Sources and then click + New source.
-
On the Set up the source page, select Google Sheets from the Source type dropdown.
-
Enter a name for the Google Sheets connector.
-
Select your authentication method:
- For Pipeloom: (Recommended) Select Service Account Key Authentication from the dropdown and enter your Google Cloud service account key in JSON format:
{
"type": "service_account",
"project_id": "YOUR_PROJECT_ID",
"private_key_id": "YOUR_PRIVATE_KEY",
...
}- To authenticate your Google account via OAuth, select Authenticate via Google (OAuth) from the dropdown and enter your Google application's client ID, client secret, and refresh token.
-
For Spreadsheet Link, enter the link to the Google spreadsheet. To get the link, go to the Google spreadsheet you want to sync, click Share in the top right corner, and click Copy Link.
-
For Batch Size, enter an integer which represents batch size when processing a Google Sheet. Default value is 1000000. Batch size is an integer representing row batch size for each sent request to Google Sheets API. Row batch size means how many rows are processed from the google sheet, for example default value 1000000 would process rows 2-1000002, then 1000003-2000003 and so on. Based on Google Sheets API limits documentation, it is possible to send up to 300 requests per minute, but each individual request has to be processed under 180 seconds, otherwise the request returns a timeout error. In regards to this information, consider network speed and number of columns of the google sheet when deciding a batch_size value.
-
(Optional) You may enable the option to Convert Column Names to SQL-Compliant Format. Enabling this option will allow the connector to convert column names to a standardized, SQL-friendly format. For example, a column name of
Café Earnings 2022will be converted tocafe_earnings_2022. We recommend enabling this option if your target destination is SQL-based (ie Postgres, MySQL). Set to false by default. -
Click Set up source and wait for the tests to complete.
Configuration Options
Stream Name Overrides (Rename Sheet/Stream Names)
The Google Sheets connector allows you to optionally rename streams (sheet/tab names) as they appear in Pipeloom and your destination. This is useful if your sheet names are not descriptive, contain special characters, or you want to standardize naming across sources.
How it works
- You can provide a list of overrides, each specifying a
source_stream_name(the exact name of the sheet/tab in your spreadsheet) and acustom_stream_name(the name you want it to appear as in Pipeloom and your destination). - If a
source_stream_nameis not found in your spreadsheet, it will be ignored and the default name will be used. - This feature only affects stream (sheet/tab) names, not field/column names.
- If you want to rename fields or column names, you can do so using the Pipeloom Mappings feature after your connection is created. See the Pipeloom documentation for more details on how to use Mappings.
- Renaming occurs before any other name conversion or sanitization options.
Example
Suppose your spreadsheet has sheets named Sheet1, 2024 Q1, and Summary. You want to rename them to sales_data, q1_2024, and leave Summary unchanged. You would configure:
[
{ "source_stream_name": "Sheet1", "custom_stream_name": "sales_data" },
{ "source_stream_name": "2024 Q1", "custom_stream_name": "q1_2024" }
]After discovery, your streams in Pipeloom will be named sales_data, q1_2024, and Summary.
How to configure
- In Pipeloom, add your overrides in the Stream Name Overrides field as an array of objects.
- If you do not wish to rename any streams, leave this field blank.
- After adding or changing a stream name override, refresh your schema in Pipeloom to see the new stream names take effect.
- Overridden streams will default to Sync Mode: Full Refresh (Append), which does not support primary keys. If you want to use primary keys and deduplication, update the sync mode to "Full Refresh | Overwrite + Deduped" in your connection settings.
Google Sheets Connector Column Name Conversion
The Google Sheets connector offers options to customize how column names from your spreadsheet are converted to be SQL-compliant. These settings can be configured in Pipeloom when setting up the connector.
1. Convert Column Names to SQL-Compliant Format
- Description: When enabled, this converts column names to a format compatible with SQL databases (e.g., lowercasing, replacing spaces with underscores). This is the primary toggle required to enable any column name conversion.
- Default: Off
2. Additional Conversion Options
The following options allow you to fine-tune the column name conversion process. They only take effect if "Convert Column Names to SQL-Compliant Format" is enabled.
-
Remove Leading and Trailing Underscores
- Description: Removes leading and trailing underscores from column names. Note that leading underscores are preserved for column names starting with a number if "Allow Leading Numbers" is disabled.
- Example:
- Input:
" EXAMPLE Domain " - Output:
"example_domain"
- Input:
- Default: Off
-
Combine Number-Word Pairs
- Description: Combines adjacent numbers and words into a single token without separators.
- Example:
- Input:
"50th Percentile" - Output:
"50th_percentile"(if "Allow Leading Numbers" is enabled) - Output:
"_50th_percentile"(if "Allow Leading Numbers" is disabled)
- Input:
- Default: Off
-
Remove All Special Characters
- Description: Removes all special characters (e.g.,
*,?,!,$,%,(,)) from column names. - Example:
- Input:
"Example ID*" - Output:
"example_id"
- Input:
- Default: Off
- Description: Removes all special characters (e.g.,
-
Combine Letter-Number Pairs
- Description: Combines adjacent letters and numbers into a single token without separators.
- Example:
- Input:
"Q3 2023" - Output:
"q3_2023"
- Input:
- Default: Off
-
Allow Leading Numbers
- Description: Allows column names to start with numbers. If disabled, a leading underscore is added to column names that begin with a number.
- Example:
- Input:
"50th Percentile" - Output:
"50_th_percentile"(if enabled) - Output:
"_50_th_percentile"(if disabled)
- Input:
- Default: Off
Additional Details
- All converted column names are lowercased.
- Multiple spaces or special characters are collapsed or removed, not replaced with multiple underscores.
- Only single underscores are used to separate tokens.
- The result is always SQL-friendly and readable.
These options provide flexibility to tailor column name conversions to your specific database requirements. Adjust them as needed in Pipeloom when configuring the Google Sheets connector.
Header Deduplication
The Google Sheets connector automatically handles duplicate column headers by appending the cell position to create unique field names. This ensures that all columns are properly synced even when your spreadsheet contains duplicate header names.
How it works
- When duplicate headers are detected, the connector appends
_<cell_position>to each duplicated header name - The cell position follows the standard Google Sheet naming convention (e.g., A1, B1, C1, etc.)
- This creates unique field names while preserving the original header text
Example
If your spreadsheet has a header named stats in both columns C and Q (positions C1 and Q1), the connector will create two distinct fields:
stats_C1(for the column at position C1)stats_Q1(for the column at position Q1)
This ensures that data from both columns is properly captured and synced to your destination, with clear identification of which column each field represents.
Supported sync modes
The Google Sheets source connector supports the following sync modes:
Supported Streams
Each sheet in the selected spreadsheet is synced as a separate stream. Each selected column in the sheet is synced as a string field.
Pipeloom only supports replicating Grid sheets.
Data type map
| Integration Type | Pipeloom Type | Notes |
|---|---|---|
| any type | string |
Limitations & Troubleshooting
Expand to see details about Google Sheets connector limitations and troubleshooting.
Connector limitations
Rate limiting
The Google API rate limits are:
- 300 read requests per minute per project
- 60 requests per minute per user per project
Pipeloom batches requests to the API in order to efficiently pull data and respect these rate limits. We recommend not using the same user or service account for more than 3 instances of the Google Sheets source connector to ensure high transfer speeds.
Troubleshooting
- If your sheet is completely empty (no header rows) or deleted, Pipeloom will not delete the table in the destination. If this happens, the sync logs will contain a message saying the sheet has been skipped when syncing the full spreadsheet.
- Connector setup will fail if the spreadsheet is not a Google Sheets file. If the file was saved or imported as another file type the setup could fail.
- Check out common troubleshooting issues for the Google Sheets source connector on our Pipeloom Forum.
IP allow list
If you use Pipeloom and your organization restricts access to specific IPs, add the Pipeloom IP addresses to your allow list.