AI Chat Agent with Any Data Source via n8n Tools

Empower an AI agent to access and query data from any service through a custom n8n sub-workflow. Chat interface retrieves dynamic data like top Hacker News posts effortlessly.

n8n
AI Chat Agent with Any Data Source via n8n Tools

This n8n workflow template creates a powerful AI chat agent capable of interacting with any data source. It consists of two key parts: a main workflow with a chat trigger (e.g., 'When chat message received') and an AI agent node that calls a custom tool, and a sub-workflow that acts as the tool for data retrieval. The example sub-workflow fetches the top 50 Hacker News posts, but users can easily replace it with nodes for any service, such as databases, APIs, CRMs, or file systems.

The agent's strength lies in its extensibility—by leveraging n8n's workflow calling feature (n8n v1.19.4+ required), it provides the AI with real-time access to external data without custom coding. Users interact via a simple chat interface: ask 'What is the 5th most popular post on Hacker News?' and the agent queries the sub-workflow, processes the response, and replies naturally.

Benefits include massive time savings in building data-aware chatbots, seamless integration with n8n's 300+ nodes, and scalability for production use. Ideal use cases: customer support bots pulling order data, analytics dashboards via natural language, internal knowledge bases, or e-commerce product searches. No advanced dev skills needed—just swap the data-fetching nodes and activate.

$19.99
Last updated October 10, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Built-in Apps workflows

More from Zainab Nair

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.