read_sheet_range
Read cell values from a Google Sheet to reveal the header row and data boundaries before writing, so values can be placed in the correct columns and next free row.
Instructions
Read cell values from a Google Sheet.
Read this before writing: it shows the header row and where the data ends so a write can be column-mapped and placed without guessing.
sheet_id is the spreadsheet's ID (the long token in its URL,
.../spreadsheets/d/<sheet_id>/edit); it is required, so confirm
which sheet to read per call. range is an A1 notation range — a bare
tab name like Sheet1 reads the whole used area, or pass something
like Sheet1!A1:E1 for just the header row. value_render_option
FORMATTED_VALUE returns values as displayed; UNFORMATTED_VALUE returns
raw numbers/dates; FORMULA returns the underlying formulas.
Returns {"range": <resolved A1 range>, "values": <rows>} where
values is a list of rows, each a list of cell strings. Trailing
empty rows and cells are omitted by the API, so len(values) is the
number of populated rows from the top of range — the next free row
when range starts at row 1 is len(values) + 1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | No | Sheet1 | |
| sheet_id | Yes | ||
| value_render_option | No | FORMATTED_VALUE |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||