API GET calls using more specific sub endpoints

Hello. I need some guidance on how to best approach creating my workflow so that the AI agent uses a more specific API sub endpoint.

In my current workflow, I have a chat trigger, AI tools agent, LLM chat model (openAI ChatGPT 4.0 mini), memory (supabase) and the http request tool.

I have a complete list of all the API endpoints and sub endpoints for the website (In json format).

Here are examples of a user chat: “Please provide me a list of devices”. Or “Please provide me a list of device types”.

I would like for the agent to pick the sub end point that best matches the input from the user. So, /api/devices/ for the device list. Or /api/device-type/ for the device types.

I just started learning n8n last week and I have made some significant progress. Including a functional workflow if I use a fixed URL for a sub endpoint in the http request tool.

Thanks for any help.

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