Use this powerful n8n workflow to create an AI Agent capable of querying Cin7 ERP data via natural language. Integrates n8n nodes for Peliqan and OpenAI for Text-to-SQL automation.
Download this n8n workflow template and start using it instantly.
Business analysts and operations staff needing instant answers from Cin7.
Technical consultants seeking pre-built n8n templates for enterprise data access.
Developers looking to deploy custom internal AI chatbots.
Companies looking to leverage n8n automation for proprietary ERP data querying.
Accessing real-time, complex business data often requires technical expertise in SQL or navigating slow ERP interfaces. This advanced n8n workflow solves this challenge by deploying an intelligent AI Agent powered by OpenAI and integrated with Peliqan.io, acting as a high-speed data intermediary for Cin7 ERP. This specific n8n template enables users to ask sophisticated business questions in plain English—for example, about inventory levels, sales order statuses, or customer accounts—and receive accurate, summarized data in response. The architecture ensures that the AI Agent has access to the comprehensive Cin7 data model, which is configured directly within the n8n node settings, guaranteeing accurate query formulation. This powerful application of an n8n workflow streamlines decision-making and democratizes data access across the organization, making complex data retrieval easy via a simple chat interface.
This comprehensive n8n workflow begins when a user submits a query through the specialized When chat message received n8n trigger. This trigger is designed to initiate the LangChain-based AI process.
When chat message received n8n trigger receives the user's question.AI Agent n8n node. This node is the core of the intelligent operation. It is configured with an extensive system message detailing the Cin7 ERP schema (tables like cin7omni.salesorders, cin7_omni.products, etc.) and instructions to use the Peliqan tool for data retrieval.OpenAI Chat Model n8n node as its language model to determine intent and formulate actions. It maintains context through the Simple Memory n8n node (a Buffer Window) for ongoing conversations.Execute an SQL query via Peliqan n8n tool. It generates the necessary SQL query based on the system instructions and the Cin7 data model provided.AI Agent n8n node, which then interprets the raw data and formulates a human-readable, conversational answer, completing the cycle of this robust n8n workflow.To deploy this powerful n8n template, follow these steps:
export N8NCOMMUNITYPACKAGESALLOWTOOL_USAGE=True in your n8n environment to allow the LangChain agent functionality to work correctly.This n8n workflow leverages several specialized n8n node types to achieve sophisticated AI automation:
When chat message received (n8n Trigger):
Function: Serves as the conversational entry point, acting as the n8n trigger that listens for user input messages.
Key Configuration: Configured as a public webhook to start the chat interaction.
AI Agent (LangChain Agent n8n Node):
Function: The central intelligence unit. It processes the user query, determines if an external tool (Peliqan) is required, and constructs the necessary action (generating SQL).
Key Configuration: Contains an extensive System Message which defines the agent's persona and includes the complete data model (tables and columns) for Cin7 ERP, ensuring the generated SQL is accurate and functional.
OpenAI Chat Model (LLM n8n Node):
Function: Provides the language processing power for the AI Agent, converting natural language into tool inputs (SQL queries) and synthesizing results back into natural language outputs.
Key Configuration: Uses predefined OpenAI credentials.
Simple Memory (LangChain Memory n8n Node):
Function: Manages the history of the conversation, allowing the AI Agent to maintain context and refer back to previous user inputs.
Key Configuration: Standard Buffer Window memory configuration.
Execute an SQL query via Peliqan (Peliqan Tool n8n Node):
Function: Acts as the specialized n8n tool for the AI Agent. It executes the dynamically generated SQL query against the Peliqan data warehouse which holds the mirrored Cin7 ERP data.
* Key Configuration: The querySql parameter is dynamically mapped to accept the SQL query generated by the AI Agent: ={{ $fromAI('SQL_Query', '', 'string') }}. Requires Peliqan credentials setup.
Use this n8n workflow to create an MCP Server endpoint, allowing AI agents to query BikeWise cycling incident data using dynamic parameters via a dedicated n8n trigger. Find more n8n templates for AI tooling.

Automate appointment scheduling using a powerful n8n workflow. Qualify leads instantly with AI, use multi-step n8n forms, and integrate human approval via Gmail.

Automate lead qualification using an n8n workflow. Verify emails with Hunter, score leads with MadKudu, and alert sales teams via Slack using this high-value n8n template.

Deploy a powerful n8n workflow using an AI agent, OpenAI, and Peliqan to transform natural language questions into accurate SQL queries against your Uniconta ERP data, leveraging Text-to-SQL technology.

Deploy an advanced AI assistant using this n8n workflow. It combines Retrieval-Augmented Generation (RAG) via Supabase and Text-to-SQL via Peliqan to query internal documents and quantitative business data effectively. This n8n template accelerates BI.

Peliqan.io is the one-click data foundation for our n8n AI Agents. Add all your business applications for RAG and "Text to SQL", and build AI chatbots and AI Agents that can interact with all internal company data from CRM, ERP, cloud storage, accounting, HRM/ATS etc.







































