Allow your AI to call an API to fetch data
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 ...
🔌 Nodes & Integrations Used (8)
📖 Implementation & Setup Guide
Use n8n to bring data from any API to your AI. This workflow uses the [Chat Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.chattrigger/) to provide the chat interface, and the [Custom n8n Workflow Tool](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/) 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](https://docs.n8n.io/advanced-ai/examples/api-workflow-tool/) in the documentation.
To use this workflow:
- Load it into your n8n instance.
- Add your credentials as prompted by the notes.
**Requires n8n 1.28.0 or above**
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Allow your AI to call an API to fetch data.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related AI Agents Workflows
View All in AI Agents →5 ways to process images PDFs with Gemini AI in n8n
How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workfl...
7 AI Sales Assistant
Production-ready n8n automation template for 7 AI Sales Assistant built by AhiXLight. Seamlessly connects Airtop Tool, Slack, Airtop with 24 configured nodes.
AAVE portfolio professional AI agent Telegram Email GPT 4o
A next-generation AI-powered DeFi health monitor that tracks wallet positions across Aave V3 using GPT-4o and LangChain. It delivers human-readable reports v...
Access control for AI agents RBAC using Airtable and Telegram
Purpose This workflow allows granular control over the access to tools connected to AI Agents (including Multi-Agent setups) using Role Based Access Control....