Actions10
- Document Actions
- Sheet Within Document Actions
Sheet Within Document → Get Row(s)
AI-generatedSummary
Retrieve one or more rows from a specific sheet within a Google Sheets document, optionally filtering rows by column values and controlling output formatting and result selection.
Inputs
- Document (required) — Specify the target Google Sheets document by selecting from a list, entering its URL, or providing its ID.
- Sheet (required) — Specify the sheet within the document by selecting from a list, entering its URL, ID, or name.
- Filters — Define zero or more filters to match rows by column values. Each filter specifies a column and a value to match.
- Combine Filters — Choose how to combine multiple filters: using AND (all conditions must be true) or OR (at least one condition is true). Defaults to AND for n8n versions 4.3 and above.
- Options — Configure data location details on the sheet such as the header row, first data row, and the specific range in A1 notation to read from.
- Output Formatting — Determine how cell values are returned, e.g., unformatted values, formatted strings, formulas, and date formats.
- Return only First Matching Row — For n8n versions 4.5 and above, choose whether to return only the first matching row or all matches when filters are applied.
- When Filter Has Multiple Matches — For n8n versions below 4.5, decide how to handle multiple matches: return only the first match or all matching rows.
Output shape
a list of object records representing rows from the sheet that match the specified filters or the entire sheet if no filters are applied
If filters are provided, results are filtered accordingly and combined with AND or OR logic. Output respects requested formatting options. Depending on configuration and n8n version, either the first matching row or all matching rows are returned. Requires specifying valid document and sheet identifiers or URLs.
Examples
Example 1: Get all rows from the 'Tasks' sheet in a specified Google Sheets document.
Set Document by ID, select the 'Tasks' sheet, leave Filters empty to retrieve all rows.
Example 2: Get rows from a sheet where the 'Status' column equals 'Completed'.
Specify the Document and Sheet, add a Filter with column 'Status' and value 'Completed', set Combine Filters to 'AND', and decide whether to return first or all matches.