Query spreadsheet once and feed into loop

Describe the problem/error/question

I have two google sheets that I query.
One is a reference list of venue data with about 1000 rows.
The other is a list team schedules with about 25 rows.

I loop through the team schedules and use the metadata to scrape a website and.
The return data includes the id of a venue.

I originally had the venue google sheet in the loop, but I was getting “Quota exceeded” errors,
My thought was to move the venue google sheet out of the loop so I only had to query it once, however I cannot figure out how to merge the venue data into the team schedule loop.

Information on your n8n setup

  • n8n version: 1.88.0
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system:

what if you load the venue data once before the loop, then loop through team schedules and scrape and finally after scraping use either a Merge or Code to attach matching venue details based on the venue id or whatever identifier you have.

1 Like

Hi Saikalyan_Akunuri,

Thank you, that put me on the right track.
I added the spreadsheet node to the start of the spreadsheet (bit of messing around to limit the output, and then added a code node in my loop to create a copy of the spreadsheet output I could use in a merge node.

I don’t think it’s an optimal solution, as it’s duplicating the entire output venue data each run, but it is working for the moment…

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.