Allow your AI to call an API to fetch data
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - HTTP Request
n8n-nodes-base.httpRequest - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Edit Fields (Set)
n8n-nodes-base.set - Aggregate
n8n-nodes-base.aggregate - AI Agent
@n8n/n8n-nodes-langchain.agent
What it does
Use n8n to bring data from any API to your AI. This workflow uses the Chat Trigger to provide the chat interface, and the Custom n8n Workflow Tool to call a second workflow that calls the API. The second workflow uses AI functionality to refine the API request based on the user's query. It then makes an API call, and returns the response to the main workflow. This workflow is used in Advanced AI examples | Call an API to fetch data in the documentation. To use this workflow: 1. Load it into your n8n instance. 2. Add your credentials as prompted by the notes. Requires n8n 1.28.0 or above