add_table_records_tool
Add new rows to a specified table in Google Sheets by providing structured records. Automatically formats data to match table columns and returns operation details.
Instructions
Add records (rows) into a table in Google Sheets at the end.
This tool adds new records into a table at the end using InsertRangeRequest,
UpdateCellsRequest, and UpdateTableRequest operations. Each record must match the table's column structure.
Records are automatically formatted according to column types.
Args:
spreadsheet_name: Name of the spreadsheet
sheet_name: Name of the sheet containing the table
table_name: Name of the table to add records into
records: List of records, where each record is a list of values matching table columns
Returns:
JSON string with success status and operation details
Input Schema
Name | Required | Description | Default |
---|---|---|---|
records | Yes | List of records to add into the table. Each record must be a list of values matching the table's column structure. Values can be strings, numbers, booleans, or None. EXAMPLE: [ ['John Doe', 30, 'HR', 50000], ['Jane Smith', 25, 'Engineering', 60000], ['Bob Johnson', 35, 'Marketing', 55000] ] | |
sheet_name | Yes | The name of the sheet containing the table | |
spreadsheet_name | Yes | The name of the Google Spreadsheet | |
table_name | Yes | Name of the table to add records into |
Input Schema (JSON Schema)
{
"properties": {
"records": {
"description": "List of records to add into the table.\n \n Each record must be a list of values matching the table's column structure.\n Values can be strings, numbers, booleans, or None.\n \n EXAMPLE: [\n ['John Doe', 30, 'HR', 50000],\n ['Jane Smith', 25, 'Engineering', 60000],\n ['Bob Johnson', 35, 'Marketing', 55000]\n ]\n ",
"items": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"type": "array"
},
"title": "Records",
"type": "array"
},
"sheet_name": {
"description": "The name of the sheet containing the table",
"title": "Sheet Name",
"type": "string"
},
"spreadsheet_name": {
"description": "The name of the Google Spreadsheet",
"title": "Spreadsheet Name",
"type": "string"
},
"table_name": {
"description": "Name of the table to add records into",
"title": "Table Name",
"type": "string"
}
},
"required": [
"spreadsheet_name",
"sheet_name",
"table_name",
"records"
],
"title": "add_table_records_toolArguments",
"type": "object"
}