Google Sheets Block
Read, write, and update data
The Google Sheets block integrates Google Sheets into your workflow to manage spreadsheet data. Read data from specific ranges, write new data, update existing cells, or append rows to the end of a sheet using OAuth authentication. Reach for it whenever a workflow needs to pull from or push to a spreadsheet.
Overview
| Property | Value |
|---|---|
| Type | google_sheets |
| Category | tools |
| Color | #E0E0E0 |
When to Use
- Read a range of cells from a spreadsheet to feed downstream blocks
- Write structured results from a workflow into a sheet
- Update existing cells with new values (e.g., status flags, computed fields)
- Append new rows to the end of a log or tracking sheet
- Sync data between an external system and a shared spreadsheet
- Build reporting or data-collection pipelines backed by Google Sheets
Configuration
Operation
Dropdown that selects which action to perform. Defaults to read.
| Label | ID |
|---|---|
| Read Data | read |
| Write Data | write |
| Update Data | update |
| Append Data | append |
Google Account
Required OAuth credential connecting your Google account (provider google-sheets). Resolves to the access token used for all API calls.
Select Sheet
File selector (basic mode) for picking a spreadsheet directly from Google Drive. Uses the google-drive provider with MIME type application/vnd.google-apps.spreadsheet. When a file is selected its Drive ID is used as the spreadsheet ID automatically.
Spreadsheet ID
Short text input (advanced mode) for entering a spreadsheet ID manually — copy it from the spreadsheet URL. Used when the file selector is not available or when the spreadsheet lives outside Google Drive picker scope.
Range
The sheet name and cell range, e.g. Sheet1!A1:D10. Optional for read (defaults to Sheet1!A1:Z1000) and write/update (defaults to Sheet1!A2). Used across all four operations.
Values
Long text input — required for Write, Update, and Append operations. Supply either a JSON array of arrays (e.g. [["A1", "B1"], ["A2", "B2"]]) or an array of objects (e.g. [{"name":"John","age":30}]). When objects are supplied the block automatically promotes object keys to a header row. Hidden for the Read operation.
- Shown when
operation=write - Shown when
operation=update - Shown when
operation=append
Value Input Option
Dropdown controlling how the Google Sheets API interprets cell values. Available for Write, Update, and Append operations.
| Label | ID |
|---|---|
| User Entered (Parse formulas) | USER_ENTERED |
| Raw (Don't parse formulas) | RAW |
- Shown when
operation=write - Shown when
operation=update - Shown when
operation=append
Insert Data Option
Dropdown controlling how appended data is inserted relative to existing table data. Available for the Append operation only.
| Label | ID |
|---|---|
| Insert Rows (Add new rows) | INSERT_ROWS |
| Overwrite (Add to existing data) | OVERWRITE |
- Shown when
operation=append
Inputs & Outputs
Inputs:
operation(string) — Operation to perform (read,write,update, orappend)credential(string) — Google Sheets access token (OAuth)spreadsheetId(string) — Spreadsheet identifier (from file selector)manualSpreadsheetId(string) — Manual spreadsheet identifier (from URL, advanced mode)range(string) — Cell range in A1 notation, e.g.Sheet1!A1:D10values(string) — Cell values data as JSON (required for write/update/append)valueInputOption(string) — Value input option (USER_ENTEREDorRAW)insertDataOption(string) — Data insertion option (INSERT_ROWSorOVERWRITE, append only)
Outputs:
data(json) — Sheet data returned by a read operation (containsrangeandvalues)metadata(json) — Operation metadata includingspreadsheetIdandspreadsheetUrlupdatedRange(string) — The A1-notation range that was written/updated/appendedupdatedRows(number) — Number of rows affectedupdatedColumns(number) — Number of columns affectedupdatedCells(number) — Number of cells affectedtableRange(string) — Range of the existing table where data was appended (append only)
Tools
- Read from Google Sheets (
google_sheets_read) — Issues a GET request to the Sheets v4 API to fetch values from a specified range. Returnsdata(range + values array) andmetadata(spreadsheet ID and URL). - Write to Google Sheets (
google_sheets_write) — Issues a PUT request to overwrite a range with the supplied values. Handles both arrays-of-arrays and arrays-of-objects (auto-generates header row). ReturnsupdatedRange,updatedRows,updatedColumns,updatedCells, andmetadata. - Update Google Sheets (
google_sheets_update) — Issues a PUT request to update an existing range. Behaves identically to the write tool in terms of body construction and response shape; semantically used when cells already contain data. ReturnsupdatedRange,updatedRows,updatedColumns,updatedCells, andmetadata. - Append to Google Sheets (
google_sheets_append) — Issues a POST:appendrequest to add rows after the last row with data in the table. SupportsinsertDataOption(INSERT_ROWS/OVERWRITE). ReturnstableRange,updatedRange,updatedRows,updatedColumns,updatedCells, andmetadata.
YAML Example
google_sheets_1:
type: google_sheets
name: "Google Sheets"
inputs:
operation: "append"
credential: "{{GOOGLE_SHEETS_ACCESS_TOKEN}}"
spreadsheetId: "1AbC2dEfGhIjKlMnOpQrStUvWxYz"
range: "Sheet1!A1"
values: "{{extract_block.rows}}"
valueInputOption: "USER_ENTERED"
insertDataOption: "INSERT_ROWS"
connections:
outgoing:
- target: next-block-id