Keyflow

Search Keyflow

Find a shortcut, workflow, MCP server or skill

Allow your AI to call an API to fetch data

n8n template #2094
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: Load it into your n8n instance. Add your credentials as prompted by the notes. Requires n8n 1.28.0 or above

How to set it up

  1. Open template #2094 on n8n.io and click Use for free, or copy the template JSON and paste it onto an empty canvas in n8n.
  2. Create a credential under Credentials → Add credential: OpenAI Chat Model. Then open each of those nodes and pick the credential.
  3. Check the model in the AI Agent node. The template may point at a model your account can't use; swap it for one you have access to.
  4. Click Execute workflow and step through each node's output to confirm the data looks right.
  5. Toggle the workflow to Active so its trigger runs on its own.

Hand off to your agent

Prompt

Help me set up the n8n workflow "Allow your AI to call an API to fetch data" (https://n8n.io/workflows/2094). It uses: HTTP Request, AI Agent, Basic LLM Chain, OpenAI Chat Model, Simple Memory, Auto-fixing Output Parser, Structured Output Parser, Call n8n Workflow Tool. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.

Paste into Claude Code and it will do the rest.

Apps and nodes

Questions

Yes. Deborah published it free on n8n.io as a verified creator, and it has 21K views. It runs on n8n Cloud or a self-hosted n8n instance.

OpenAI Chat Model. The other 7 nodes are built into n8n.

Similar workflows

NameViews
  1. Explore n8n Nodes in a Visual Reference Library5,197
  2. Automate social media content with AI for Instagram, Facebook, LinkedIn & X16K
  3. Automate SEO blog content creation with GPT-4, Perplexity AI and WordPress6,949
  4. Automate SEO blog creation + social media with GPT-4, Perplexity and WordPress5,798
  5. BambooHR AI-Powered Company Policies and Benefits Chatbot3,025
  6. Automated Stock Analysis Reports with Technical & News Sentiment using GPT-4o37K
  7. 🔍 Perplexity Research to HTML: AI-Powered Content Creation35K
  8. Build Your First AI Data Analyst Chatbot134K