Google Sheets
Stream the rows of Google Sheets tabs, ranges, named ranges and tables into Streamkap with Connect with Google, your own OAuth client or a service account key.
The Google Sheets source reads the sheets you define, each a tab, a range of a tab, a named range or a Sheets table, and writes every one to its own topic, source_<id>.google_sheets.sheet_<name>. Each row of the sheet becomes a record, and a row that is edited, added or removed in the sheet arrives as an update, an insert or a delete.
What Syncs
sheet_<name>: one topic per entry in Sheets, with a row per sheet row.spreadsheet_metadata(optional): one row per spreadsheet your definitions name:spreadsheet_id,title,locale,time_zone,auto_recalc,spreadsheet_url,named_ranges(JSON text),drive_version,drive_modified_time.sheet_metadata(optional): one row per tab of those spreadsheets:spreadsheet_id,sheet_id,title,index,sheet_type,hidden,row_count,column_count,frozen_row_count,frozen_column_count,sheet_url, andcolumns, the map from each column to its header (see Column Names). Itsidis<spreadsheet_id>|<sheet_id>.
The Sheet metadata preset adds both metadata resources.
Every sheet_<name> record has these columns:
| Column | What it holds |
|---|---|
id |
The Kafka key: the row number as text, or the key columns you chose |
row_number |
The row’s number in the sheet, as Google Sheets shows it at the left of the row |
spreadsheet_id |
The spreadsheet the row came from |
sheet_id |
The numeric id of the tab (the gid in the sheet’s URL) |
| one text column per header | The cell’s value, see Column Names and Values |
streamkap_changed_at |
When Streamkap read the row, in UTC |
There is no Backfill start date: a sheet has no history, so every read covers the whole sheet.
Prerequisites
- A Google Sheets spreadsheet, or several. An uploaded Excel file in Drive is not one: see Troubleshooting.
- One of the four ways to sign in, with what each needs:
- Connect with Google (Streamkap): a Google user who can open the spreadsheets. Nothing to create in Google Cloud. Offered only where Streamkap has turned it on for your deployment; the form hides it otherwise.
- Service account key: a Google Cloud project where you can enable APIs and create a service account key.
- Connect with Google (your OAuth client): a Google Cloud project where you can enable APIs and create an OAuth client.
- Paste a refresh token: the same OAuth client, and a refresh token minted with it.
Google Setup
Skip this section for Connect with Google (Streamkap): there is nothing to set up in Google. Go to Streamkap Setup.
For the other three, first enable both APIs in your Google Cloud project. In the Google Cloud console, select the project and enable the Google Sheets API and the Google Drive API under APIs & Services → Library. Streamkap reads the cells through the Sheets API and checks the file’s version, kind and trash state through the Drive API.
A service account needs no consent screen and no browser sign-in.
- Under IAM & Admin → Service accounts, create a service account. It needs no Cloud role.
- Open it, choose Keys → Add key → Create new key → JSON, and keep the file. You paste the whole file into Streamkap.
- Open each spreadsheet in Google Sheets, click Share, and add the service account’s email (
client_emailin the key file) as a Viewer. For a spreadsheet in a shared drive, add the email to the shared drive instead.
- Under Google Auth platform → Audience, set the user type to Internal (Google Workspace), or set External to In production. A consent screen left in Testing issues refresh tokens that expire after 7 days. Both scopes Streamkap asks for are sensitive or restricted, so an External app shows Google’s unverified-app warning until Google verifies it; Internal avoids that.
- Under Google Auth platform → Clients, create a client of type Web application.
- For Connect with Google (your OAuth client), add the redirect URI that the Streamkap form shows under Authorized redirect URIs. The form shows it once you choose that mode, and before you click Connect with Google Sheets.
- Copy the Client ID and Client secret.
The Google user who connects, or who minted the refresh token, reads what that user can open, so there is no sharing step. Google keeps at most 100 refresh tokens per user and client and revokes the oldest.
Scopes
| Mode | Scopes requested |
|---|---|
| Service account key, Connect with Google (your OAuth client), Paste a refresh token | https://www.googleapis.com/auth/spreadsheets.readonly and https://www.googleapis.com/auth/drive.metadata.readonly. Both are required. At Google’s consent screen they read See all your Google Sheets spreadsheets and See information about your Google Drive files. |
| Connect with Google (Streamkap) | https://www.googleapis.com/auth/drive.file only: access to the files you choose in Google’s Picker, and no others. Google words this scope as access to create or modify those files; Streamkap only reads them. |
Streamkap Setup
1. Create the Source
- Navigate to Add Connectors.
- Choose Google Sheets.
2. Connection Settings (Auth Tab)
- Source name: A unique name for this source.
- Authentication: Connect with Google (Streamkap), Service account key, Connect with Google (your OAuth client) or Paste a refresh token. The form starts on Connect with Google (Streamkap) where it is offered, and on Service account key where it is not.
- Click Connect with Google Sheets. In Google’s window, sign in as a user who can open the spreadsheets and allow the access Streamkap asks for. The form then shows Connected and Connected as with the Google account.
- Click Choose spreadsheets. Google’s Picker opens: select the spreadsheets to sync. Each one is added to Sheets as a row named after the file, reading its first tab, and its
sheet_<name>is selected under Resources. To read another tab, a named range or a table, click List tabs in its row and choose it under Reads. - Streamkap can read only the spreadsheets chosen in the Picker. Click Choose spreadsheets again to add more, or to choose again one that stopped working. Only the Streamkap user who connected can choose more later: anyone else who needs to must click Connect with Google Sheets and connect as themselves.
- If someone removes Streamkap’s access at Google Account → Security → Third-party connections, or unshares a chosen file from the connected user, that resource fails with guidance to pick it again.
- A Google Workspace admin who blocks third-party apps must allow Streamkap’s OAuth client under Security → API controls in the Google Admin console. The error names the client ID.
- Service account key: The whole JSON key file.
- OAuth client ID and OAuth client secret: From your OAuth client.
- Click Connect with Google Sheets. The button waits until both fields are filled. In Google’s window, sign in as a user who can open the spreadsheets and allow both permissions. The form then shows Connected.
- OAuth client ID, OAuth client secret and Refresh token: From your OAuth client, and a token minted with that same client for the
spreadsheets.readonlyanddrive.metadata.readonlyscopes by a Google user who can open the spreadsheets.
Test connection signs in and opens each spreadsheet your definitions name, checking the file kind and trash state, and finding each tab, named range or table. It checks the first 10 spreadsheets, since each check uses Google’s per-user read quota; Test access still reads every selected sheet within its request budget. See Test connection and Test access. Click Next.
3. Sheets and Resources
Both are on the same tab as the sign-in, below it, and Test connection needs them filled.
- Sheets: One row per sheet to sync. Click Add a sheet (or Choose spreadsheets with Streamkap’s app), and in its row:
- Spreadsheet: The link from the browser’s address bar, or the ID in it.
- Reads: Click List tabs to list the spreadsheet’s tabs, named ranges and Sheets tables, then choose one. First tab reads the spreadsheet’s first grid tab. Charts-only and Connected Sheets tabs are listed but cannot be chosen, since they have no cells to read. Listing opens the spreadsheet with the credentials above and uses one Sheets read of Google’s read quota and one Drive call, so it runs only when you click. If those credentials cannot open the spreadsheet, the row says why, for example that it is not shared with the service account or was not chosen in the Picker.
- Name: The
sheet_<name>resource. Choosing what an unnamed row reads names it for you. - Range, key columns and re-reading (optional): A range of the tab, the header names that key each row (one per line), and Re-read on every poll.
- Edit as JSON shows the same definitions as JSON. See Sheet Definitions.
- Resources: Each row’s
sheet_<name>is selected for you as you add, rename and remove rows. Addspreadsheet_metadataandsheet_metadataif you want them: Add a preset → Sheet metadata adds both. Every definition must be selected and every selectedsheet_<name>defined.
4. Review and Create
Check the summary and click Create. Then send the topics to a destination: see Send topics to a destination. A Google Sheets source is not limited to one per Google account (see One source per vendor account): one credential can back several sources, which share its read quota.
Sheet Definitions
Each row of Sheets is one definition, and one sheet_<name>. Through the API, sheets is the same definitions as a JSON list in a string, with sheet_<name> selected in resources for each:
name: Lowercase letters, digits and underscores, starting with a letter, at most 41 characters, unique, and notmetadata.spreadsheet: The link from the browser’s address bar (https://docs.google.com/spreadsheets/d/<id>/edit) or the ID in it. A link to a sheet published to the web has no ID and is refused.- Exactly one of
sheet(a tab’s title),named_range(a named range) ortable(a Sheets table’s name). With none, the definition reads the spreadsheet’s first grid tab, which is what the Picker adds. range(optional, withsheetonly): An A1 range without the tab name, such asA3:H,B2:K500,A:Dor2:500. Its first row is the header.key_columns(optional): Header names that make a stable key. See Keys.always_reread(optional, defaultfalse): Read the sheet on every poll. See Freshness.
[
{"name": "orders", "spreadsheet": "https://docs.google.com/spreadsheets/d/1AbC.../edit#gid=0", "sheet": "Orders"},
{"name": "q4_targets", "spreadsheet": "1AbC...", "sheet": "Targets", "range": "A3:H", "always_reread": true},
{"name": "merchants", "spreadsheet": "1XyZ...", "named_range": "active_merchants", "key_columns": ["Merchant ID"]},
{"name": "merchants_table", "spreadsheet": "1XyZ...", "table": "Merchants"}
]
These read, in order, a tab, a range of a tab whose header is in row 3, a named range with a stable key, and a Sheets table. A named range or table is its own range, so range does not apply to it.
On save, Streamkap adds the id of the tab, named range or table (sheet_id, named_range_id or table_id) to each definition, and a definition with no selector gains the first tab’s sheet and sheet_id. Leave these as written; in the form, a saved row’s Spreadsheet and Reads are locked for this reason. Because the id is what Streamkap reads by:
- Renaming a tab, named range or table in Sheets changes nothing. The next save writes its new name into the definition.
- Changing a definition’s spreadsheet, its selector kind (tab, named range or table),
rangeorkey_columnswould change every row’sidor the columns, so it is refused: save the changed definition under a new name and deselect the old resource.nameitself is the resource, so a new name is a new topic.always_rereadcan change freely. - A deleted tab, named range or table fails that resource, naming what the spreadsheet still holds. It deletes no rows. Restore it, or remove the resource and define the new one under a new name.
Behavior & Limits
How a row is keyed, how fresh it is, how deletes and column names work, and the Google quota the source shares.
Keys
- Row number (default):
idis the row’s number in the sheet. It works for every sheet, but inserting or deleting a row above others moves the rows below it to new numbers, so Streamkap re-sends them under their newid. A sheet that gets rows inserted at the top re-sends most of its rows each time. key_columns:idis built from the listed headers’ values, so a row keeps itsidwhen it moves. Use header text exactly as typed in the sheet. Each value combination must be unique and non-blank on every row; a duplicate or blank key fails the poll, naming the rows, before anything is deleted.row_numberis then the row’s position when it last changed, and a row that only moved is not re-sent.
Set the destination to upsert on id.
Freshness
Streamkap polls every 5 minutes. Each poll asks Google Drive for the spreadsheet’s version and modified time. A sheet is read again when that changed, and at least once an hour regardless.
Some values change without Google reporting a file change: IMPORTRANGE, volatile formulas such as NOW, RAND, TODAY, GOOGLEFINANCE, IMPORTXML, IMPORTDATA and IMPORTHTML, and possibly Google Forms submissions. They show up within the hour. Set "always_reread": true on a definition to read it on every poll instead, and only on sheets that need it: each read spends Google’s read quota. A volatile formula re-sends its rows on every read that sees a new value.
Deletes
- With
key_columns, a row deleted or emptied in the sheet, or cut off by a smallerrange, is deleted downstream: the destination receives a record for itsidwith__deleted = true. With the row-number key, the rows below a deleted row move up and are sent again under their new ids, and the delete arrives for the last id. A header with no data rows below it deletes every earlier row. See Deletes. - Deletes are exact at any sheet size, up to Google’s 20 million cell limit.
- On a very large
key_columnssheet, after a mass change Streamkap may need to re-read only the key columns to name every deleted row. Those deletes arrive when that re-read finishes, not in the same poll as the updates: about 15 seconds for 200,000 rows with a one-column key, a minute for a million, and about 21 minutes at 20 million. Nothing is left undeleted. - A read that fails, a tab that no longer exists and a read that Google changed underneath delete nothing.
- With
key_columns, a key missing from a read is confirmed by reading the sheet a second time, and a key the second read lists is kept. A formula can reorder rows between two reads without a file change, and a row that only moved is not a delete. That second read spends more of Google’s read quota on a poll that finds deletes. - A formula that still shows
Loading…holds its row back until it settles, and the row’s existing record is kept.
Column Names
Column names are made from the header row by one rule, so the same header row always gives the same columns and only editing a header renames a column:
- Letters and digits are kept. Everything else, such as spaces, punctuation and emoji, becomes
_. Right-to-left marks and other invisible format characters are dropped, and full-width letters read as their plain forms. - A header with characters outside ASCII (accented letters, Arabic, CJK, Devanagari, emoji) gets a deterministic ASCII name: its Latin letters and digits without accents, then
_and a 10-character tag computed from the header text. A header with no Latin letters left becomescol_<tag>. The same header always gets the same name, wherever its column is, and two headers that read differently never share one. To find the header behind a column, readcolumnson the tab’ssheet_metadatarow (below). - Names are lowercase, at most 63 bytes, with
_trimmed from the ends. - A blank header (or one with only punctuation) becomes
col_<letter>, such ascol_d. A name that starts with a digit gets acol_prefix. - A name that repeats an earlier column, or one of
id,row_number,spreadsheet_id,sheet_id,streamkap_changed_at,__deleted, gets_<letter>appended. - Only the first row of the definition’s range is read as the header, and columns to the right of the last non-blank header are not read. A header that is blank in the middle is
col_<letter>.
| Header in the sheet | Column |
|---|---|
Order ID |
order_id |
ID in column A |
id_a |
Name in column B, name in column C |
name, name_c |
2026 Target |
col_2026_target |
Total (€) |
total_43cdfn7ldk |
Café |
cafe_tb7qwtghek |
订单号 |
col_36lsph27bz |
اسم التاجر |
col_u2xc4h26oq |
Price 💰 |
price_jzaequ5ccp |
| blank, in column D | col_d |
Each sheet_metadata row carries columns, a JSON map of every definition that reads that tab to its columns: the column name, the header exactly as Google serves it, its column letter and its place in the header row. It is updated whenever a header changes, and is null on a tab no definition reads. For a definition named orders whose header row starts ID, Merchant, اسم التاجر:
{"orders": {"col_u2xc4h26oq": {"header": "اسم التاجر", "letter": "C", "position": 3}, "id_a": {"header": "ID", "letter": "A", "position": 1}}}
A tab with more than one frozen row is a Test access warning: only the first row is the header, and the other frozen rows are read as data. Set a range that starts at the header row to fix it.
Values
Every data column is text, unformatted and independent of the spreadsheet’s locale. A cell with no value is null.
- Text arrives as shown, without a leading apostrophe.
- Numbers, currency, percentages and scientific values arrive as the shortest decimal with no exponent and no trailing
.0: a cell shown as12.5%is0.125, and1E+16is10000000000000000. - Booleans and checkboxes are
trueandfalse. - Dates are
YYYY-MM-DD. Date-times areYYYY-MM-DDTHH:MM:SSin the spreadsheet’s time zone with that zone’s offset at that moment, such as2026-03-14T09:30:00+03:00. Times areHH:MM:SS, and a duration of a day or more counts hours past 24. Change the time zone in File → Settings and the offsets follow it. - Errors arrive as their text:
#N/A,#DIV/0,#VALUE!,#REF!,#NAME?,#NUM!,#NULL!or#ERROR!. - Formulas arrive as their result. The cells an
ARRAYFORMULAorQUERYfills are ordinary cells, and rows vanish when the result shrinks. - Merged cells give every cell they cover the top-left cell’s value, so a vertically merged
Regionfills each of its rows. - Links arrive as their text, never the URL. Dropdowns arrive as the chosen value; smart chips as their text.
- A row with every column empty is skipped, and row numbering continues past it.
Not synced: hyperlink URLs, cell notes, comments, images, charts, and tabs that have no cells to read, which are charts-only tabs and Connected Sheets tabs (a preview of a BigQuery or Looker source is not the data). Hidden rows and columns, filters and protected ranges do not change what is read.
Rate Limits and Quota
Google allows each user 60 Sheets reads a minute per Cloud project. A service account is that user, or the Google user who connected, and the quota is shared with every other tool using the same credential. Streamkap paces itself at 0.8 requests a second, which is 48 a minute with a short burst, leaving 12 a minute for Test connection and your own use of the credential. A throttle from Google is waited out and retried. If the quota is used up for long, the status says so and the next poll tries again: give the source a credential of its own.
- A full read of a sheet costs
2 + rows × columns ÷ 20,000Sheets reads, rounded up. An idle poll costs one Drive call per definition and no Sheets read. - Connect with Google (Streamkap) reads through Streamkap’s Google project, so its quota is shared with other users of that app. Streamkap waits and retries on a throttle.
- More than one source on the same credential or Google user adds up, so give busy sources a credential each.
For sheets of 5,000 rows and 20 columns, each in its own spreadsheet, polled every 5 minutes with the hourly read, and both metadata resources selected:
| Sheets | Sheets reads a day | Drive calls a day | Hourly read |
|---|---|---|---|
| 1 | 240 | 864 | about 10 seconds |
| 5 | 1,200 | 4,320 | about 50 seconds |
| 20 | 4,800 | 17,280 | about 190 seconds |
Every edit adds 10 reads per changed sheet here, 7 without the metadata resources, and always_reread on every sheet makes the hourly figure every poll: 20 such sheets use about half of the per-user quota all day. If always_reread sheets need more reads than the pace allows, polls take longer than 5 minutes.
A spreadsheet holds up to 20 million cells. Reading one takes about 1,000 reads, about 21 minutes, spread over about 5 polls, and uses about 28% of the per-user quota if read hourly. Nothing is refused for size.
Editing the Source
- Credentials: click Replace on the key, client secret or refresh token and save. If you change the OAuth client ID, enter the new client’s secret and a token minted with it in the same save.
- Changing the authentication mode needs that mode’s credentials in the same save.
- Definitions: see Sheet Definitions for what a rename or a change does. Adding a definition and selecting its
sheet_<name>reads that sheet in full.
Everything else follows Editing an API source.
Troubleshooting
| Message starts | Cause | Fix |
|---|---|---|
| “Google rejected the service account key …” | The key or its service account was deleted or disabled | Create a new JSON key, paste it with Replace and save |
| “Google rejected the refresh token …”, “Google refused the refresh token or the OAuth client …” | The token was revoked, unused for six months, replaced past Google’s 100-token limit, or expired after 7 days because the consent screen is in Testing | Set the consent screen to Internal or In production, then Connect with Google Sheets again or paste a new token |
| “Google rejected the OAuth client …” | Wrong client ID or secret | Copy both again from APIs & Services → Credentials |
| “The Google Sheets API / Google Drive API is not enabled in the Google Cloud project …” | An API is off in the project of your service account or OAuth client | Enable it under APIs & Services → Library, wait a few minutes, and test again |
| “Google cannot open spreadsheet …”, “Streamkap cannot open a spreadsheet of this source …” | The spreadsheet is not shared with the credential’s identity, or the ID is wrong | Share it as Viewer with the service account’s email, or with the Google user who connected, or fix the link |
| “… tab / named range / table ‘…’ not found in spreadsheet ‘…’. Tabs: … Named ranges: … Tables: …” | The name does not exist; the message lists what does | Correct the name. If you renamed a tab before the source first saved, enter its new title |
| “… no longer exists in ‘…’” | The tab, named range or table a definition is pinned to was deleted | Restore it, or remove the resource and define the replacement under a new name |
| “… is a chart-only tab with no cells to read” | The tab holds a chart or image, not cells | Select a grid tab |
| “… is a connected-sheets tab that holds only a preview …” | The tab shows a preview of an external data source | Extract the data to a grid tab and select that, or sync the data source itself |
| “… is an uploaded Excel file (.xlsx), not a Google Sheets spreadsheet” | An Excel or CSV file stored in Drive | Open it in Google Sheets, choose File → Save as Google Sheets, and use the new link |
| “… is in the Google Drive trash” | The spreadsheet was trashed | Restore it from the trash, or remove the definition |
| “The header row of the sheet is blank …” | The first row of the tab or range has no text | Put column names in the first row, or set a range that starts at the header |
| “key column(s) … not found in the header row. Headers: …” | key_columns names a header that is not there |
Use a header exactly as typed in the sheet |
| “rows N and M have the same key_columns value …”, “row N has no value in key column(s) …” | The key is not unique or has a blank on some row | Fix the rows. Nothing was deleted. Or use the row number key |
| “… changed after it first synced (its spreadsheet, tab, range or key columns) …” | A definition changed under the same name | Restore it, or save the change under a new name |
| “Google granted the connection without … Connect with Google again and allow both permissions”, “The refresh token was minted without …” | A scope was unticked at consent, or missing from the token | Connect again and allow both permissions, or mint a new token with both scopes |
| “… Streamkap opens only the spreadsheets chosen in Google’s Picker: click Choose spreadsheets and pick it …” | Connect with Google (Streamkap): the file was unshared, deleted, or never picked | Click Choose spreadsheets and pick it again, as a user who can open it |
| “Google no longer honours this connection …” | Connect with Google (Streamkap): access was removed at Third-party connections, went unused for six months, or was replaced after 100 connections | Reconnect with Google Sheets, then choose the spreadsheets again |
| “Your Google Workspace admin blocks Streamkap (admin_policy_enforced) …” | A Workspace admin restricts third-party apps | Ask the admin to allow the client ID the message names under Security → API controls |
| “Only the person who connected this source can choose files …” | Someone else clicked Choose spreadsheets | Click Connect with Google Sheets and connect as yourself, or ask the person who connected |
| “Google’s per-user read quota (60 reads a minute) is used up …” | Other tools, or too many sources, share this credential | Give the source a credential of its own; the next poll retries |
| “a header cell is still computing in Google Sheets (Loading…)” | A header formula has not settled | Nothing: the next poll reads it again |
| “… is a link to a spreadsheet published to the web …” | The link has no spreadsheet ID | Copy the link from the address bar while the spreadsheet is open |
| “Resources select sheet_x, which no entry in Sheets defines”, “Resources leave out sheet_x …” | Sheets and Resources disagree | Select every definition and define every selected sheet_<name> |
Related Documentation
- API sources - how API sources work, Test access, editing, deletes and status.
- Google Analytics 4 - daily GA4 reports, preset or your own.
- Google Ads - campaigns, ads and daily performance reports.