Google sheet tool and get rows with search

In n8n it is possible to perform a “contains” search on a spreadsheet with a Google Sheet node linked to a filter node. But how can I use this inside an AI AGENT?

The Google Sheet Tool does not allow you to perform a “contains” search, but the search is performed only on the exact word. So on the text “fare le lavorazioni per Michel” if I search for “michel” with the Google Sheet Tool I do not find anything, while if I perform the search through a node linked to a filter then it is found.

How can I do this type of search in the Google Sheet Tool?

Information on your n8n setup

  • n8n version: : current
  • Database (default: SQLite):. sqLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): remote with nginx proxy
  • Operating system: Linux Debian 12

Some features will require the use of a subworkflow. No way to avoid that.

I’ve made a good combination of Sheets API + AI in this template here.

Take a look. See if you find the answer you are looking for. But I must say… Sometimes a subworkflow is required for more customized results.

:point_right: If my reply answers your question, please remember to mark it as the solution.

hi, yes I know that, but I have thinked that a simple search would require a sub tool. however thanks.

M.

Yeah, I agree with you.

I know this might not be answer you were looking for, but that’s probably the only way with the default nodes.

But another option would be to use HTTP Request tool and build the request yourself.

This way you would have full control over the variables of the request and would probably be able to do 90% with tools only.

Does that solve your problem?

Hi, i have resolved the problem (with your suggestions) creating a custom Tool that get all rows and then filter on it.

The question now is: how to expand it not only for search like “operation contains FOOBAR” where FOOBAR is a single word but for request of “operation contains FOOBAR1 OR FOOBAR2 OR FOOBAR3”

thanks again

1 Like

If you are using CONTAINS, then it should already work like that.

Because FOOBAR3 contains FOOBAR.

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