How to Link Function Node with HTTP Request in AI Agent Workflow

I’m pretty new to n8n and programming overall, so this could be a simple issue. I can’t figure out how to properly link a Function node to an HTTP Request node when working within an AI Agent setup.

Basically, I created an HTTP request that calls the Google Places API to fetch data about new restaurants in my area. Now I want to process this data by filtering out places with ratings below 4 stars and limiting the output to just the first 10 results. Everything I’ve found online suggests connecting the HTTP request to a function node for data processing, but I’m having trouble making this connection work in my current setup.

Has anyone dealt with this before? What’s the correct way to chain these nodes together in an AI Agent workflow?

just link your http req to the function node input, then in the func use $input.all() to get data and filter for ratings > 4. you can limit to 10 with .slice(0, 10). should do the trick!