Google Sheets Add Row Error

UPDATE: FIXED by removing the colon ‘:’ from the Google Sheet name

Thank you @Donald_Mitchell !

I just tested and found that if you have a colon in the sheet name, you can only update one cell. If you try to update multiple cells, you’ll get that error.

If you try to update multiple cells and remove the colon from the sheet name, it should update properly.

After some more research it appears this is actually a known bug in Google Sheets, and it doesn’t look like they’re going to fix it anytime soon. Best to just remove that colon or use one of the other workarounds.

My Current Flow is:

  1. Get Info for Prompts (Variables, Google Sheet)
  2. Have a Prompt that Outputs a JSON
  3. Process the JSON into Bundles
  4. Post Info to Google Sheets as new Rows

I have tried:

  1. deleting and adding back in the module
  2. the various combinations of flags (headers/ no headers, formatted/unformated,user input, raw)
  3. Running the flow and then re-adding back in the relevant variables

Screenshot of Error:

The operation failed with an error. 400: INVALID_ARGUMENT - Requested writing within range [‘INPUT: Topics’!A12], but tried writing to column [B]

Relevant Flow:

JSON Input

JSON OUTPUT

Variables

image

Add Row Config

Hello @Joshua,

I’ve not run into this error before, but after a quick Google search I came across some posts that indicate you may have a character encoding issue, specifically the colon symbol in the name of the sheet. It may not like “INPUT: Topics”. Can you try change it to something like “INPUT- Topics” ? This might be the quickest and easiest fix.

If you install the Integromat Dev Tool, it will allow you to see the exact API call(s) that module is using to complete your request. The error may become apparent after examining the request URL and body.

2 Likes

I will test that. This is a great lead.

Im taking output from openai directly. Any recommended ways to clean up character encoding in the text? I see some Text Functions.

I just tested and found that if you have a colon in the sheet name, you can only update one cell.
If you try to update multiple cells, you’ll get that error.

If you try to update multiple cells and remove the colon from the sheet name, it should update properly.

After some more research it appears this is actually a known bug in Google Sheets, and it doesn’t look like they’re going to fix it anytime soon. Best to just remove that colon or use one of the other workarounds.

2 Likes

Just tested some more and found that if you can figure out a reliable way (for your situation) to determine the next usable row, you can use Google Sheets Update a Row on that row and it will accept the colon in the sheet name.
If you’re adding multiple rows, start with the first usable and increment by 1 for each row update.

Here’s one way to get the last used column, just tweak it to get the last used row.

2 Likes

Thank you @Donald_Mitchell ! This fixed the issue and I added the fix to the main post

1 Like