Add rows
The Google Sheets Add Rows tool allows users to seamlessly append one or more rows to a specified Google Sheets worksheet using a flexible JSON array format. It ensures smooth integration by requiring exact column header names or positional value arrays, making data management efficient and error-free.
Features
- Append multiple rows to any Google Sheets worksheet in a single operation.
- Supports JSON arrays with objects using exact column headers for precise data mapping.
- Allows use of positional arrays matching column order as an alternative input format.
- Requires fetching spreadsheet info first to accurately identify worksheet names and column headers.
- Automatically appends new rows after the last row with existing data to preserve worksheet integrity.
Benefits
- Streamlines data entry processes by automating row appending to Google Sheets.
- Reduces errors with strict column header matching and input validation.
- Enhances productivity by processing multiple rows simultaneously in one request.
- Facilitates integration with various applications through flexible JSON input formats.
- Ensures data consistency and organization by properly identifying worksheet structure before updating.
Description
Append one or more rows to a Google Sheets worksheet. Pass rows as a JSON array. Preferred format: array of objects with column header keys (e.g., [{"Name": "Alice", "Email": "alice@example.com"}]). Use Get Spreadsheet Info first to discover the exact column header names — keys must match headers exactly (case-sensitive). Alternatively, pass rows as arrays of positional values matching column order. New rows are appended after the last row with data.
Parameters
4 parameters
| Name | Type | Description |
|---|---|---|
| spreadsheetIdrequired | string | The spreadsheet ID from the Google Sheets URL. |
| sheetNamerequired | string | The worksheet (tab) name. Use Get Spreadsheet Info to discover worksheet names. |
| rowsrequired | string | JSON array of rows to append. Each row can be an object with column header keys or an array of positional values. Example (objects): |
| hasHeaders | boolean | Whether row 1 contains column headers. Required when passing rows as objects. Default: |