Google Sheets Update Multiple Rows

Hey there. I am desperate for help. I’m currently using google sheets node and trying to update multiple rows with item list. When I use “Function” node it works but it only returns first item on the list. Instead If I use “Function item” node; it does take all the list but doesn’t update sheet. I would appreciate any help. Thanks!

This works :+1:

This isn’t :frowning_face:

Function item node that I’m using

Information on your n8n setup

  • n8n version:14.15.5

  • Running n8n via Docker

Hi @burakyccl, it seems your Function Item node returns an array containing a single item rather than a single item. The Function Item node runs for each item individually so you wouldn’t usually need to return an array of items here.

This seems to be the main difference between the data structures from your two screenshots.

Does the update still fail if instead of the array you return something like this in your Function Item node:

return {
    data: [$json.rows.split(',')]
};
1 Like

Thank you @MutedJam for your answer! I thought I tried this but it works. But now I have another problem. I added range expression to update range field but it doesn’t work. It only updates first row i.e A1:F1. The property that I’m using is incremental 1,2,3 so It should update with every item as A1:F1 > A2:F2 Shouldn’t it?

I’ll ask this as separate question