Google Sheets and Filter

Hi,

I have a workflow that reads a google sheet with about 103,000 rows. I then have 2 separate nodes which only keep the columns needed and then filters for anything that starts with an “A”.

I was wondering if I should filter within the Google Sheets Read Node or use the filter node?
If it is in the google sheets Read Node how do I input that filter??

Many Thanks

Alex

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

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

First off, having 103k rows in a spreadsheet highly suggests you should switch to a proper database - this would make filtering way more performant too.

I did some tests, but our Google Sheets node does not allow for wildcards, so you’re limited to the following two scenarios:

  • Loop over all items in the sheet and use an If or Filter node to select only the ones that you need.
  • Add a column to the spreadsheet using a function to mark rows that need to be processed. You can then use the filter in the Google Sheets node to select these rows.

Looping over all items will obviously slower.

In addition, you’re likely to run into memory issues because of the size of the dataset. Here are some strategies for avoiding them.

1 Like

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