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. In Peliqan this is called “writeback”.
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”.N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE to True, by executing this command on the CLI:
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.jsonStep 4: configure credentials in n8n
Configure your credentials for OpenAI, Supabase and Peliqan. You can find your Peliqan API key in Peliqan under Settings.Step 5: 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
Peliqan script to fetch your data model
Adding an API endpoint to dynamically fetch the data model
Adding an API endpoint to dynamically fetch the data model
Add an API handler script in Peliqan that sends the data model in the response:Add an API endpoint in Peliqan with path 

/datamodel and link it to the above handler script. In n8n, use the Peliqan Tool node with Resource “Endpoint” and Operation “Exec” and select the API endpoint you created in Peliqan:Step 6: 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
Add multiple tables as source for RAG dynamically
Use the Peliqan node with resource “Table” and Operation “List” to get a list of all your tables in Peliqan. Apply a filter if needed and use the filtered list to get the data of each table.



Step 7: configure “writeback” actions
You can perform actions in your n8n workflows via Peliqan, for example adding a contact in Hubspot, sending a message to Slack or creating a draft invoice in Xero. This is done as follows:- Add a script of type “API handler”
- In the script, use Peliqan’s writeback functions, for example “Slack send message” (see right pane next to script editor > Connected SaaS Applications).
- Create a custom API endpoint and link it to the API handler script (Use JWT authorization and method POST)
- In n8n, use the Peliqan node with following Parameters:
- Resource: Endpoint
- Operation: Execute
- API endpoint: select the API endpoint you created in Peliqan
Use Peliqan DWH as a Vector Store
The above example uses Supabase as the Vector Store and creating embeddings (vectorizing) is performed from the n8n workflow. However, it’s also possible to use the Peliqan data warehouse as Vector Store, using a pipeline script in Peliqan to vectorize your source data. Add the tool Postgres PGVector Store under your AI Agent in n8n, and configure your Peliqan data warehouse DB in that node:Pipeline script to vectorize source data in Peliqan
Pipeline script to vectorize source data in Peliqan
FAQ
What if my data source (business application) is not listed on Peliqan ?
What if my data source (business application) is not listed on Peliqan ?
Contact Peliqan Support (support@peliqan.io), our connector team can add new connectors within a few business days.
Can my AI Agent show a link to the source data on e.g. Google Drive or Notion (using RAG) ?
Can my AI Agent show a link to the source data on e.g. Google Drive or Notion (using RAG) ?
Yes, make sure to add Metadata when feeding your data into the Supabase Vector Store, e.g. the field _source_url that links to the original source.
Can I get help building my AI Agent ?
Can I get help building my AI Agent ?
Yes, contact Peliqan Support (support@peliqan.io) if you have generic questions. The Peliqan Customer Service team can also recommend partners that specialize in building custom AI Agents.
