Coumn "0" error


read success



append fail

I'm experimenting with Retool using a connected Google Spreadsheet for learning purposes,
but I'm stuck at the very beginning — building the first basic input screen.

I can read data from the sheet just fine,
but when I try to append a row, I get the following error:

column "0" not found. expected column name to be one of "id", "name"

I've double-checked that:

  • My sheet name is correct (role_test)
  • The first row contains id and name
  • The sheet is connected and readable in Retool
  • I even added sample data manually, but append still fails

Any ideas on why this is happening?

Hello @krsailer82, welcome to the Retool Community!

It looks like the issue you're encountering with the Google Sheets query is related to how the JSON data is being constructed or interpreted, particularly when using the Append Data action.

When appending data, ensure that the JSON format is correctly structured. If you're referencing input values dynamically, you can use inline scripting like this:

[
    {
        "id": {{textInput1.value}},
        "name": {{textInput2.value}}
    }
]

Make sure that the fields in your JSON object match the column headers in your Google Sheet. Here's a visual reference of the input form and corresponding sheet structure:


Sheet Data


Double-check your field names and data types to ensure compatibility. Let us know if you need help validating your input structure!

2 Likes