AcademyWorkflowsOperations

Let your AI call an API to fetch data

Operations and automation teams that want a chat assistant to answer questions with live data from an API.

  • Recommendedour rating
  • 21,483views on n8n
Open on n8n.io ↗

Paste it straight onto an n8n canvas with Ctrl+V or Cmd+V.

allow-your-ai-to-call-an-api-to-fetch-data.json

Loading the file...

AI automation

Want this workflow running in your company?

A template is the start. We adapt automations like this to your tools, handle the exceptions, and test and monitor them so they hold up under real load.

  • Free 20-minute call to look at your process
  • Connected to the tools you already use
  • Tested, monitored and documented

What it does

An n8n template where a chat interface sends questions to an AI agent. The agent uses a second workflow as a tool, which refines the API request from the user's query, calls the API and returns the response. It needs n8n 1.28.0 or above and your own credentials.

Use cases

  1. 01Ask a chat assistant for data from an internal API
  2. 02Turn a plain-language question into an API request
  3. 03Reuse the API sub-workflow in other agents

Connects

HTTP Request · AI Agent · Basic LLM Chain · OpenAI Chat Model · Simple Memory · Auto-fixing Output Parser · Structured Output Parser · Call n8n Workflow Tool

Questions about
Let your AI call an API to fetch data.

What is Let your AI call an API to fetch data used for?

Operations and automation teams that want a chat assistant to answer questions with live data from an API. An n8n template where a chat interface sends questions to an AI agent. The agent uses a second workflow as a tool, which refines the API request from the user's query, calls the API and returns the response. It needs n8n 1.28.0 or above and your own credentials.

How do I import Let your AI call an API to fetch data into n8n?

Copy the workflow JSON from this page and paste it onto the n8n canvas with Ctrl+V or Cmd+V. Then connect your credentials in each node.

Is Let your AI call an API to fetch data safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.