Problem in Get Row(s) in Google Sheets node

When we try to use the Google Sheets node to Get Row(s) with mode than one spreadsheet id input, it always output the data from the first spreadsheet id only as many inputs as we have.

How to run it:

  1. Create two or more spreadsheet files in google drive and create the access credentials in n8n.
  2. Create a Code node to return two or more spreadsheets ids.
  3. Connect it to a Google Sheets node to retrieve data from the previous node spreadsheet id. ({{ $json.id }})
  4. Run

Information on your n8n setup

  • n8n version: 1.90.2
  • Database: mysql
  • Running n8n via: npm
  • Operating system: Mac ARM

n8n code:

Try passing sheet id along with file id. I think that sheet identification by name internally resolves to a sheet id.

If this helps to resolve your issue, please mark this post as a :white_check_mark: Solution.

Hi @fernandolima,

It is odd that the step doesn’t work like this in the first place, but here’s a workaround.
You can use a loop step in between the code and google sheet.

Hope this workflow helps!

If this post resolves your issue, make sure to mark it as the solution so others can benifit from the answer.

Hi, @rbreen , thanks for giving attention to this.

Yes, it works using the loop node. Thank you very much. But I still want to make it with the google sheets node only because I personally think it is a better practice and maybe it is some bug.

Anyway, thank you for your help with a second way of doing it!! I will let the forum open a little bit more to check if it is relly a bug or if I’m doing something wrong.

Hi @fernandolima,

Glad it helps! I’ll try to work on it and see if I can make the sheets node work on its own as well.

Robert

Hi, Olek. Thanks for answering.

I’m already passing the sheet id as the reference. Was it what you told me to do? Maybe I understood you wrongly.

You have a point. Can confirm the node locks-in with the data based on the first entry inputs.

I think the response by @rbreen is the Solution here.