Question about Google Sheets Update Function

Hey there, I have the following issue. I have a very simple sheets table with 3 rows (attaching a screenshot)

I’ve connected N8N to Google Cloud API like is described in the documentation, and everything works fine, except for 1 function - Update.

No matter what I try, the update function is not working. It’s executing just fine, no errors, but nothing is updated in the rows. However, if I create an “Create or Update” rows are created just fine.

[Screenshot of N8n - Google Sheets


Information on your n8n setup

  • **n8n version: Latest
  • **Running n8n via Windows 10 Desktop

Hi @discountground, can you confirm the JSON data you are sending to the Google Sheets node from your screenshot?

Yes. In matter of fact the data you see on the screenshot is the JSON data entered via “Create or update” function which works perfectly fine (but it doesn’t work in my case because it creates new row every time)

However if I switch to “update” function, it executes fine with no errors but no data is updated in Google sheets.

This is valid no matter if I use Oath or service account for credentials.

Also I should mention that I’ve only tried the windows desktop version (on two different PC’s with windows 10 and windows 11) with the same results on both.

Hey @discountground, this suggests n8n can’t find a matching value in the column specified in the Key field. So it’d be great if you could share the exact JSON data you are passing on to your Google Sheets node.

Oh, here we go.

Could you change the view to JSON by clicking the respective button? The table view might hide white spaces, but the JSON view should reveal them.

Thx, could you try reading your Google Sheet using n8n as well and share the JSON view of it? Feel free to redact anything confidential, I am just interest in the line including Orders

Using the read node I got this result

It seems the Orders value is different. If it says 129 in your sheet, but the data you are using for the update in n8n says 134, n8n won’t find a row to update.

If you don’t have a unique key using which n8n can identify the row to update you would need to use the RAW Data option:

Here’s an example workflow performing an update in the A2:C2 range:



Hope this helps!

Hey there I just tried it but sadly it still don’t work. This is the error I receive.

Hey @discountground, you’d need to use the data format I am using in my example workflow above. Try copying the Build raw data node along with the Google Sheets node, it should return the rows array required for the update.

Hey, I don’t see the “Build Raw Data” now as an option in N8N, however, I’m already using the “Set” node to segregate the data before it goes to Sheets.

Hi @discountground, you can just copy the node from my example workflow to see how it’s set up:

Select it, press Ctrl+C and then press Ctrl+V in your own canvas.

I did, but it gave me an error. Btw all, this looks extremely not user-friendly. Is there any particular reason for this to not work just like it works on all the other automation apps? Just select the data and populate it into the predefined cells?

Hey @discountground, you might need to adjust the expressions to point to the actual data you have. However, in your previous screenshot you’re suggesting you already have field Orders, Revenue, ADV. So you should be able to simply connect the example I have provided to your own node returning these fields.

Well, yea, but as you can see, sadly it’s not working :frowning:

No, I can not see that. The input data from your latest screenshot suggest no Orders , Revenue , ADV fields are present:

It’s very different from the input data on your previous screenshot:

The second screenshot show the data you should be able to feed directly into the example node I have built for you. If you want to use different input data you would of course need to update the expressions accordingly.

To get a basic idea of how the update works you might want to run the entire example workflow I have built for you in a first step. Just update the Spreadsheet ID when doing so.

The “Previous” Screenshot data is after the data is segregated from the SET node because I need only specific data pulled from WooCommerce via API.
Then I need that data (orders, revenue & aov) to be populated in google sheets.

It’s obviously beyond my competency so I will just move on for now and use my current solution (Pabbly) but thanks.

If I can share feedback - devs should rethink how this whole thing works because it’s beyond overcomplicated for such a simple task.

In every other program, the same task is a matter of 4 clicks. Here I have to have nodes that convert data, expressions, raw data output, and what not and I can’t still solve the issue.

Granted, the other apps are paid, but as far as user-friendly-ness goes, it’s worth it. If I could figure that whole expression thing alone, I’d probably don’t need N8N in the first place. Btw I searched the forum and issues on Github and there are tons of people complaining about the same exact sheets function with no resolution at the end. I even saw a comment on a youtube video literally from 3 hours ago with the same exact issue.

P.S. - here is the video Getting Google OAuth Credentials for n8n - YouTube

" The Dark One

The Dark One

преди 1 ден

[ @n8n ] That’s absolutely not true. N8N doesn’t refresh the token. Also I wrote 5 times in the past 20 days about UPDATE function in Sheets not working and nobody responded."

The “Previous” Screenshot data is after the data is segregated from the SET node because I need only specific data pulled from WooCommerce via API.

Hi @discountground, that’s perfect. You should be able to use these values that you’ve already extracted by just copying in one new node and connecting it to the data you already have.

That’s absolutely not true. N8N doesn’t refresh the token."

As for the separate authentication issue with your token, this is might be a problem with either your Google account (as described here) or caused by the fact that you’re using the desktop app (which will not be able to renew a token since it’s not typically running 24/7).

Also I wrote 5 times in the past 20 days about UPDATE function in Sheets not working and nobody responded."

From looking through this thread it seems you’ve gotten several responses.