Connectors

Contact support

Helpdesk portal

Build AI agents with n8n and Peliqan

AI Agents require data to gather knowledge and answer questions, and they need connectivity to business applications in order to take actions. Peliqan is the data foundation for AI that provides your AI Agents in n8n with data from all your business applications through a single node, as well as “tool” nodes that allow your AI Agents to take actions in your applications such as adding & updating data, creating tasks, adding a draft invoice or anything else you can imagine. Peliqan is the unified gateway for n8n to all your internal company data.

image

AI Agent capabilities

With Peliqan, you can add following capabilities to your AI Agents in n8n:

  • Text to SQL: allow your AI Agent to convert any question in natural language to an SQL query, executed on the Peliqan data warehouse. Your AI Agent can combine data from all your sources (CRM, ERP etc.) and answer complex analytical questions.
  • RAG (Retrieval Augmented Generation): allow your AI Agent to search internal knowledge including structured and non-structured data (e.g. Google Drive, Notion etc.) in order to answer any knowledge-related question.
  • MCP style actions: allow your AI Agent to take actions in your business applications such as scheduling a task, adding draft invoices based on worked hours etc.

Getting started

Step 1: signup for a free trial on Peliqan

Sign up for a free trial on Peliqan and add one or more connections, for example to your CRM, ERP, Accounting software, HRM/ATS, cloud storage (Google Drive, Sharepoint), files (Excel, CSV) etc. Peliqan will automatically build up an ELT pipeline and sync all data into the built-in data warehouse, which will act as an ultrafast cache for your AI Agents to access data using e.g. RAG or “Text to SQL”.

Step 2: install the Peliqan community node

In your self-hosted n8n environment, add the Peliqan community node under Settings > Community nodes > npm Package Name “n8n-nodes-peliqan”.

image

If you want to use Peliqan as a “Tool” under your AI Agent (e.g. for “Text to SQL” queries), set the environment variable N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE to True, by executing this command on the CLI:

export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=True

Step 3: download the n8n template

Download this n8n template and import it into your n8n environment.

Peliqan AI Agent RAG and SQL V2.61.json22.1 KB
image

Or checkout the Peliqan n8n template on the n8n website.

Step 3: configure credentials in n8n

Configure your credentials for OpenAI, Supabase and Peliqan.

You can find your Peliqan API key in Peliqan under Settings.

Step 4: Configure “Text to SQL”

Update the “System Message” of your AI Agent, with a list of tables and their columns.

You can run the below script in Peliqan to generate a list of tables and columns from selected sources, and copy/paste the output.

Peliqan script to fetch your data model (click to expand script)

Add your datamodel dynamically (optional)

You can also retrieve your data model automatically from Peliqan by setting up an API endpoint in Peliqan, linked to this script, and adding this API endpoint as a Tool under your AI Agent in n8n.

Adding an API endpoint to dynamically fetch the data model (click to expand)

Step 4: Configure RAG

Make sure to add one or more data sources in Peliqan that you would like to use for RAG, for example Notion. Click here for more info on how to connect Notion and sync all Notion page content to Peliqan.

Use the lower blue section in the n8n template to feed data from the Peliqan data warehouse into your Supabase vector store for RAG.

First, prepare your Supabase to be used as a Vector Store.

Next, in the n8n workflow, configure a table in the Peliqan node “Get table data” from the Peliqan data warehouse, for example the table that contains all your Notion pages content. Run this section of the workflow to feed all your data into the Supabase Vector Store.

Add multiple tables as data source

You can also add multiple tables from the Peliqan data warehouse as data source for feeding into the Supabase Vector Store.

Add multiple tables as source for RAG dynamically (click to expand)

FAQ

What if my data source (business application) is not listed on Peliqan ?
Can my AI Agent show a link to the source data on e.g. Google Drive or Notion (using RAG) ?
Can I get help building my AI Agent ?