Appearance
Google Sheets integration
Google Sheets lets you manage tabular data collaboratively. This integration enables your WeWeb backend to read rows, query by ID, insert new rows, update existing rows, and delete rows programmatically.
Use cases
- Power lists and detail pages by reading spreadsheet rows
- Append new form submissions as rows
- Update rows by an identifier column
- Remove stale rows from workflows
- Use Google Sheets as a data source for tables — Add a table linked to a spreadsheet and sheet; configure views (columns, range) and bind them to Data Grids or fetch with
Fetch table view.
Setup
In Google Cloud, create a project and enable:
- Google Sheets API
- Google Drive API (needed to list your spreadsheets in WeWeb)
Create a service account, then create and download a JSON key.
In WeWeb, go to the
Integrationstab →Google Sheets→Add connection.Add your credentials for each environment you use (
Editor,Staging,Production):Client Email— From the JSON key (client_email)Private Key— From the JSON key (private_key)
You can also upload the JSON key file in the connection screen to auto‑fill these fields.
Share each spreadsheet: In Google Sheets, share the target spreadsheet with the service account email (
Client Email) as Viewer or Editor so WeWeb can read or write.Test: In WeWeb, add a table (
Data & API→Tables→Add table→Google Sheets) or run theGet all rowsaction to confirm authentication and access.
Using Google Sheets as a data source for tables
Besides calling Google Sheets actions from workflows, you can use Google Sheets as a data source for tables in WeWeb. A table linked to Google Sheets reads rows from a spreadsheet and sheet you choose; the first row of the sheet is used as headers, and you configure a view (columns to return, optional range). That view can be bound to table components (e.g. Data Grid) or fetched from the interface with the Fetch table view action.
Add a Google Sheets table
- In WeWeb, go to
Data & API→Tables→Add table. - Choose Google Sheets as the data source.
- Select your Google Sheets connection.
- Select Spreadsheet: the list is loaded from the Google Sheets API (you can refresh it). Then select Sheet (the tab name). WeWeb fetches the sheet's columns from the first row (headers); all columns are treated as text.
- Save. The table is now available in your project.
Configure a view
Views define which columns and range of data the table exposes. On the Google Sheets table you added:
- Create or edit a view for that table.
- Configure:
- Columns to return — Select which header names to include, or leave empty for all columns. Options are loaded from the sheet's first row.
- Range (under Range & Filters) — Optional. A1 notation (e.g.
A2:Z1000). If empty, the backend fetches the used range of the sheet. Use this to skip a header row or limit rows.
When the view is loaded (e.g. by a table component or Fetch table view), the backend calls the Google Sheets API with the sheet name (or range), returns the first row as headers and the rest as rows. Each row is an object keyed by header name.
Use the table in the interface
- Bind a view — In the binding menu, under Table Views, select the view. Bind it to a Data Grid, repeating group, or list.
- Fetch table view — In an interface workflow, add the
Fetch table viewaction, choose your Google Sheets table view, and pass any parameters the view expects.
Auto-generated API workflows for the table
When you add a Google Sheets table, WeWeb can create backend API workflows for that table:
- Get Row by ID — Retrieve a single row by matching a column to a value.
- Create Row — Append a new row using header‑mapped values.
- Update Row by ID — Update a row matched by column + value.
- Delete Row by ID — Delete the first matching row.
And you can then call these APIs from the interface (e.g. form submit → Create Row).
For the general pattern of tables, views, and fetching data, see Working with data and Fetch table view.
Using Google Sheets in the interface
- Table views — Bind a Google Sheets table view to a Data Grid, repeating group, or list from the Table Views binding menu. Use the
Fetch table viewaction in an interface workflow to load or refresh that view's data. - Actions — The five Google Sheets actions (Get all rows, Get row by ID, Insert row, Update row by ID, Delete row by ID) are available in backend workflows.
Common pitfalls (setup & usage)
Spreadsheet not shared with service account
If the target spreadsheet isn't shared with the service account email, it will not appear in the available spreadsheets. You must share the spreadsheet with your service account's email.
Headers missing
The integration relies on on the headers of the spreadsheet being in the first row. Ensure row 1 contains headers for each column.
All Actions
This integration provides five actions mapped to the Sheets API.
| Action | Description |
|---|---|
| Get all rows | Read rows from a sheet or range, with optional column selection |
| Get row by ID | Find a row by matching an ID column to a value |
| Insert row | Append a new row using header-mapped values |
| Update row by ID | Update a row found by ID column and value |
| Delete row by ID | Delete a row found by ID column and value |
Action details
Get all rows
Read rows from a sheet or range and return an array of objects keyed by header name.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Spreadsheet | "1AbC...xyz" | Target spreadsheet | Required |
Sheet Name | "Products" | Named sheet to read | Required |
Columns to returnOptional | ["Name","Price"] | Columns to include in the response | Column headers must exist |
RangeOptional | "A2:Z1000" | Limit the range to fetch (A1 notation) | If empty, uses the sheet’s used range |
Value Render OptionOptional | "FORMATTED_VALUE" | Value format | FORMATTED_VALUE, UNFORMATTED_VALUE, FORMULA |
Major DimensionOptional | "ROWS" | Returned dimension | ROWS, COLUMNS |
Example output
json
[
{
"Name": "Widget",
"Price": "10.00"
},
{
"Name": "Gadget",
"Price": "25.00"
}
]Documentation of API endpoint that powers action: Google Sheets API – spreadsheets.values.get
Get row by ID
Find and return a single row by matching an ID column to a value.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Spreadsheet | "1AbC...xyz" | Target spreadsheet | Required |
Sheet Name | "Products" | Named sheet to search | Required |
ID Column | "id" | Column to match (picked from the sheet’s header row) | Must exist as a header |
Value | "sku-123" | Value to match in the ID column | Text |
Columns to returnOptional | ["Name","Price"] | Columns to include in the response | Column headers must exist |
Example output
json
{
"id": "sku-123",
"Name": "Widget",
"Price": "10.00"
}Returns null if no matching row is found.
Documentation of API endpoint that powers action: Google Sheets API – spreadsheets.values.get
Insert row
Append a new row mapped to the sheet's header row.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Spreadsheet | "1AbC...xyz" | Target spreadsheet | Required |
Sheet Name | "Products" | Named sheet to append to | Required |
Select columns to includeOptional | ["id","Name","Price"] | Choose which columns to include | Leave empty for all columns |
Values | {"id":"sku-123","Name":"Widget","Price":"10.00"} | Column names and values for the new row | Keys must match header names |
Value Input OptionOptional | "USER_ENTERED" | Input mode | RAW or USER_ENTERED |
Example output
json
{
"spreadsheetId": "1AbC...xyz",
"tableRange": "Products!A1:C1",
"updates": {
"spreadsheetId": "1AbC...xyz",
"updatedRange": "Products!A5:C5",
"updatedRows": 1,
"updatedColumns": 3,
"updatedCells": 3
}
}Documentation of API endpoint that powers action: Google Sheets API – spreadsheets.values.append
Update row by ID
Update a row matched by ID column and value.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Spreadsheet | "1AbC...xyz" | Target spreadsheet | Required |
Sheet Name | "Products" | Named sheet to update | Required |
ID Column | "id" | Column to match (picked from the sheet’s header row) | Must exist as a header |
Value | "sku-123" | Value to match in the ID column | Text |
Select columns to includeOptional | ["Price"] | Choose which columns you want to update | Leave empty for all columns |
Values | {"Price":"12.00"} | Column names and new values | Keys must match header names |
Value Input OptionOptional | "USER_ENTERED" | Input mode when writing | RAW, USER_ENTERED |
Example output
json
{
"spreadsheetId": "1AbC...xyz",
"updatedRange": "Products!A3:C3",
"updatedRows": 1,
"updatedColumns": 3,
"updatedCells": 3
}Documentation of API endpoint that powers action: Google Sheets API – spreadsheets.values.update
Delete row by ID
Delete the first row that matches the ID column and value.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Spreadsheet | "1AbC...xyz" | Target spreadsheet | Required |
Sheet Name | "Products" | Named sheet to delete from | Required |
ID Column | "id" | Column to match (picked from the sheet’s header row) | Must exist as a header |
Value | "sku-123" | Value to match in the ID column | Text |
Example output
json
{
"spreadsheetId": "1AbC...xyz",
"replies": [{}]
}Returns null if no matching row is found (fails silently).
Documentation of API endpoint that powers action: Google Sheets API – spreadsheets.batchUpdate (deleteDimension)
Error handling
| Error code and type | Reason |
|---|---|
| 401 Unauthorized | Invalid or missing credentials. |
| 403 Forbidden | Spreadsheet not shared with the service account or insufficient IAM permissions. |
| 404 Not Found | Spreadsheet or sheet not found. |
| 400 Bad Request | Invalid range or parameters. |
| 429 Too Many Requests | Rate limited; backoff and retry. |
| 500 Internal Server Error | Provider-side error; retry with backoff. |
FAQs
Why can’t I see my spreadsheet in the Spreadsheet dropdown?
Check these points:
- Make sure the Google Drive API is enabled in your Google Cloud project.
- Make sure the spreadsheet is shared with the service account email (
Client Email). - If you just changed API settings or sharing permissions, refresh the dropdown and try again.
Why do I get a 403 error even though I shared the spreadsheet?
This usually means Google still isn’t letting the service account access the file.
- Make sure you shared the spreadsheet with the exact service account email (
Client Email). - Give the right permission:
- Viewer is enough for read actions
- Editor is required for insert, update, and delete actions
Why are my column options missing (or look wrong)?
WeWeb uses the first row of your sheet as the column names.
If row 1 is empty, has duplicate names, or changes often, the mapping can break.
Fix it by:
- Making sure row 1 contains stable, unique column names
- Refreshing the columns in the action (or reselecting the sheet)
Why does Insert row or Update row by ID write to the wrong column?
In the Values object, the keys must match your column names exactly (including spaces and capitalization).
If you renamed columns after building the workflow, reselect the sheet/columns so WeWeb refreshes the available columns.
Why does Delete row by ID delete only one row?
It deletes the first matching row only (even if multiple rows match).
If you need to remove several rows, fetch the rows first and then loop through them.
How do I avoid creating duplicate rows?
A common pattern is:
- Run
Get row by ID(for example using an email column). - If it returns
null, runInsert row. - If it returns a row, run
Update row by IDinstead.
How do I find the Spreadsheet ID?
Copy it from the spreadsheet URL between /d/ and /edit.
Do I need a specific header row?
Yes. The first row is used as headers for mapping values in insert/update actions.

