Appending data a google sheet does not work

  1. My goal:
    Take some data from a table row in an online app and append it to the bottom of a google sheet.

  2. Issue:
    I get an error that is completely unrelated to what I am actually trying to do.

I have tried using hardcoded strings for all the values. I have tried column1, column2... both with and without brackets as well as the header label as seen in the screenshot.

  1. Steps I've taken to troubleshoot:
    I have tried to read the documentation, without finding anything useful. And the only posts on the forum with a similar issue had formatting errors in their JSON data which I do not believe to be the case here (although if that is the case the wrong error message is still a bug). Have also tried to append data via a query library query, same issue there.

  2. Additional info: We're on a cloud plan.

Hi @Vegard,

Looking at the Google Sheets API docs this error could be cause by a few different reasons.

The error generally means one of the following:

  1. The sheet name Butikk ID doesn't exist in the spreadsheet.
  2. There’s a typo or formatting issue in the range string.
  3. You're using A1:ZZ1 when the API expects a range for rows, not a header row (depending on your use case).
  4. The sheet name has special characters or spaces and is not properly encoded.

At first glance it looks like your values to append is set up correctly, but I did notice that the query seems to not have a "Sheet Name" input field which although not necessary led me to wonder if you are working on an older, self deployed version of Retool :thinking:

Is the sheet you are appending to the first sheet and empty, or does it have column headers?

Hi @Jack_T,

Thanks for the reply, but I am still unfortunately still stuck with this issue.

The sheet is the first and only sheet. As of now there is a header row, but I get the same error if I try removing it.


As far as I can tell we are on the newest cloud version of retool.

The only input options retool gives me for appending data is what you see: Spreadsheet and Values to append. And as you can see from the screenshot in my original post nowhere in any of those fields have I given the inputs with Butikk ID or A1:ZZ1. I just do not see how mye inputs here could be corrected to resolve this error.

Making me believe this is an issue with the retool Google Sheets resource type.

Very odd, thank you for letting me know you are on cloud. You should be by default on the most up to date version and see the same input field on the Google Sheet query :thinking:

Correct you do not have Butikk ID or A1:ZZ1 in your Retool query, this is being added to the error response on the Google Sheets side and being sent to Retool.

Here is a video example of me trying a query with no sheet specified and the wrong keys for column titles/heads.

The error message lets me know what it is expecting and once I correct these in the 'Values to Append' input field it works successfully.

Let me know if you have everything set up the same way I do.

I am using the spreadsheet ID, directly in the Spreadsheet selection box. Due to no options beeing available when using the dropdown. Although when I do a "List available spreadsheets", I can see the sheet I want to append data to with the ID I have provided.

I have even tried adding a new google sheets resource to see if that makes the "Select spreadsheet" selector populated with data or at least gives a different error. I have different retool app reading Butikk ID from a different sheet, but I don't see how that could "inject" itself into this error on a different resource in a different app.

Ok that is understandable, as i showed in my example the query will default it the first sheet if none is specified and you mentioned you are not using multiple sheets inside the spreadsheet.

What happened when you created a new resource and test out a new query using that resource? Did you test it on a different spreadsheet?

The new resource gave the exact same error. Same goes for appending the data to a new Sheets file in drive.