Append rows
append_valuesAppend rows to a Google Sheets table after the last data row. Provide a range or sheet name; the API locates the first free row and writes values, with optional row insertion.
Instructions
Appends rows after the last row of the data table that contains the given range — pass the table's region (e.g. "Sheet1!A1:D1" or just "Sheet1") and the API finds the first free row itself; the response's updates.updatedRange shows where the rows actually landed. insert_data_option INSERT_ROWS pushes existing data below down; OVERWRITE (default behaviour) writes into the free rows after the table. Never retried after an ambiguous failure — re-appending would duplicate the rows, so check the sheet first (read_values) before re-sending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | A1 range identifying the table to append to (the API scans it for the last data row). | |
| values | Yes | 2-D array of cell values, outer array = rows: [["Name","Score"],["Ada",42]]. null leaves the existing cell untouched. | |
| spreadsheet_id | Yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. | |
| insert_data_option | No | OVERWRITE writes after the table (default); INSERT_ROWS inserts new rows, shifting data below. | |
| value_input_option | No | USER_ENTERED (default) parses formulas/numbers/dates; RAW stores literal strings. |