Free training
Free N8N Training – 2026
N8N (pronounced "n-eight-n") is an open-source automation tool. It lets you visually connect applications together to automate action flows (called workflows). Unlike Zapier or Make, N8N offers you:
N8N (pronounced "n-eight-n") is an open-source automation tool. It lets you visually connect applications together to automate action flows (called workflows). Unlike Zapier or Make, N8N offers you:
- A drag-and-drop visual interface
- Total freedom thanks to optional self-hosting
- Endless possibilities with dynamic expressions and JS code
- And above all, a cost close to 0 for the self-hosted version!
Understanding the fundamentals of N8N
What is a workflow?
A workflow is a sequence of automated actions triggered by a specific event. In N8N, each automation is constructed as a logical flowchart, made up of three essential elements:
- Trigger: the starting point of the scenario (e.g. new message, form submitted, task scheduled...)
- Nodes: action blocks connected to each other (e.g. send an email, filter data, publish on Slack...)
- Result (Output): end of automation, after execution of all connected nodes
Key workflow components
Node types
N8N offers hundreds of nodes, divided into major families:
- Actions Send emails, add to CRM, create files...
- Conditions: execute an action only if a criterion is met
- Functions Custom transformations (with or without JavaScript)
- Integrations: connections with external services (Google Sheets, Notion, Airtable, etc.)
Credentials
To interact with external services (Google, Slack, Stripe, etc.), N8N uses credentials which you only need to add once. Each node can then securely reuse these accesses.
The execution cycle
When a workflow is triggered:
- The trigger detects an event
- Data passes from one node to another according to the direction of connections
- Each node processes data, modifies or enriches it
- In the end, you get an automated and documented result
Example of N8N use
Issues
The assistant spends too much time having to:
- manually retrieve e-mails containing accounting documents,
- scan and file physical documents sent by mail.
Document sources
- Scanned physical documents sent by e-mail to a dedicated address.
- Digital documents received directly by e-mail as attachments.
Automated solution with N8N
-
Setting up a unique e-mail address to centralize reception.
-
Monitoring new e-mails with an IMAP node.
-
Automatic download of PDF, JPG, PNG attachments.
-
Differentiated processing according to file type (text or image).
-
AI-based content analysis to identify the customer via a Google Sheet file (customer database).
-
Automatic recording:
- in the customer's Google Drive folder,
- or in an "A_TRIER" folder if the customer is not recognized.
-
Sending an e-mail notification if manual sorting is required.
Getting to grips with the interface
Navigation
N8N's interface is intuitive and visual. Here's what you need to know:
-
Work area (Canvas) The central space where you assemble your nodes. Here you can visually create your workflow using drag & drop.
-
Side bar: for quick access to:
- saved workflows,
- credentials for API connections,
- the executions history with status, errors and details of each action.
-
Top bar: it offers essential functions:
- Activate or deactivate a workflow
- Save manually
- Access the history of previous versions
Useful functions
N8N offers comfort tools for a better organization of your workflows:
- Zooming & Refocusing Zoom in and out freely. A button automatically readjusts all nodes on screen.
- Automatic layout: reposition all nodes cleanly with a single click to keep the layout easy to read.
- Tags & Folders Organize your workflows by customer, theme or project. Ideal for freelancers or agencies.
- Notes & Colors Add comments directly in the Canvas (with Markdown support) and color zones to help you find your way around.
- Versioning & Restoration: every change can be saved. You can return to a previous version at any time.
Building your first workflow
A good workflow always starts with a simple, clear structure. Here are the steps for creating your first automation in N8N:
1. Create a trigger
The trigger is the starting point of the workflow. There are several types of trigger in N8N:
- Manual trigger: useful for testing during construction
- Scheduled triggering (CRON): execution at specific times (e.g. every night at 2 a.m.)
- Webhook triggering N8N awaits an external HTTP call (e.g. form, third-party tool)
- Triggering by service Execute when an event occurs in an application (e.g. new Gmail mail, new Google Sheets row).
2. Add nodes
Once the trigger is in place, you can add nodes to perform actions. Here are the most common ones to get you started:
- Set: allows data to be defined manually (e.g. first name = "Lucas")
- Function: allows you to write custom JavaScript to manipulate data
- If: adds a logical condition (e.g.: if amount > 100€, then...).
- Wait: pause the scenario (up to several days)
- HTTP Request: sends a request to an external API to interact with other services
3. Test your workflow
Before publishing your workflow, you can test it directly from the interface:
-
Run a manual test from the "▶ Test Workflow" button
-
View outputs of each node in different formats:
- 🧾 Table: readable, simple
- 🔍 JSON: raw format, ideal for debugging
- 🧬 Schema: data structure
-
Identifying errors (node in red) and correct logic or data
-
Clean inputs/outputs using the trash icon on each node
💡 Tip: use zoom and refocus to keep a clear view of your logic, especially if your workflow expands!
Go further with powerful modules
Once you've mastered the basics, N8N lets you exploit advanced modules to transform your data, manipulate files, integrate artificial intelligence and enhance the security of your automations.
Data transformation
These modules can be used to reformat, group or filter the information received:
- Split In Batches: divides a list into batches and processes them one by one
- Merge: merges two separate data streams
- Aggregate: groups several elements into a single array
- Remove Duplicates: removes duplicates from a list
- Rename Keys: rename fields (useful for harmonizing APIs)
- Sort: sorts data in ascending/descending order
- Filter Select data according to specific criteria
- Summarize: calculates totals, averages, min/max...
File handling
N8N can manipulate files natively or via API:
- 📤 Upload/Download FTP automatic file upload and download
- 🗜 Compression / Decompression formats: ZIP, GZIP, etc.
- 🔄 Conversion between formats: HTML ↔ Markdown ↔ PDF
- 🖼 OCR, image editing via services such as Cloudmersive or DeepAI
Artificial intelligence
N8N integrates the best AI models to enrich your workflows:
- Text generation (OpenAI, Claude, Mistral...) from dynamic prompts
- Automatic summaries of documents or customer exchanges
- Classification of content, extraction of key entities (people, places, etc.)
- Sentiment analysis (positive, neutral, negative) of a text
- Human-in-the-loop: allows a human to validate or reject a step (e.g. previewing a generated email)
Security & access management
Workflows can handle sensitive data. Here's how to secure them:
- Authentication via OAuth2 tokens, API Keys login/password, etc.
- Secure webhooks with signature or IP whitelist
- Masking credentials (not visible in logs or exports)
- Detailed execution logs with status, duration, timestamp and errors
- Auditability: precise tracking of each job over time
Integrate N8N with your tools
N8N offers extensive compatibility with the most widely used applications in the professional world. Thanks to its native connectors and API calling capabilities, it becomes a real bridge between all your tools.
Popular compatible tools
Here is a non-exhaustive list of services that you can easily connect to your workflows:
- Google Gmail, Drive, Calendar, Docs, Sheets
- Productivity: Notion, Airtable, Trello, ClickUp
- Communication LinkedIn, Twitter, Discord, Slack
- E-commerce & Payment Stripe, PayPal, Shopify, WooCommerce
- WordPress: via its REST API to publish or retrieve content
- CRM HubSpot, Pipedrive, Zoho, SalesForce (via API)
- Databases PostgreSQL, MySQL, MongoDB (via dedicated nodes)
Create useful automations
Here are a few examples of the kind of automation you can create with N8N:
- 📁 Automatic backup from Google Sheets to Dropbox every day at 2 a.m.
- 📝 Real-time synchronization of a web form (e.g. Tally or Typeform) with your CRM
- 🔔 Instant notification on Slack when a Stripe payment is received
- 📊 Automatic PDF report generation from collected data (e.g. emailing or forms)
- 🌍 Multilingual article translation via DeepL or Google Translate and automatic publication on your blog
💡 N8N's appeal lies in the freedom to create scenarios tailored to your business, whether they're simple or highly complex.
Optimize, deploy and maintain
Well thought-out automation deserves a reliable infrastructure. Whether you use N8N in the cloud or self-hosted, here's how to monitor, document and deploy your workflows in the best possible conditions.
Monitoring & error management
- Replaying a failed execution from the "Executions" tab to quickly understand the origin of a bug
- Creating an emergency workflow (fallback) to automatically restart an action in the event of a critical error
- Analyze logs of each run: response code, duration, precise errors, data exchanged
- Tracking by execution ID for detailed tracing
Best practices
- 📌 Using global variables (e.g. usernames, base URLs) to centralize key elements
- 💾 Regularly export your workflows in JSON format, for quick backup or cloning
- 📝 Documenting your scenarios with internal notes in Markdown format (in the Canvas) for each critical block
Use N8N for free: Cloud vs. self-hosted with Coolify
☁️ Cloud version (n8n.cloud):
- Instant configuration, no server required
- Secure hosting managed by N8N
- Pay-per-use offer (limited number of runs per month)
-
🧩 Self-hosted version with Coolify:
- 🌍 Coolify is an open source alternative to Heroku / Netlify / Vercel, allowing you to deploy N8N in 1 click without knowing anything about Docker or server management
- 💡 Ideal for hosting multiple no-code/open source tools (N8N, UptimeKuma, Plausible, etc.) for just a few euros a month. vs. a paid subscription to each tool (€100/month very quickly...).
- Easy installation via graphical UI (or command line for experts)
- Contabo VPS recommended: from €4.49/month with SSD storage, perfect for running Coolify + N8N
- Total control: 100 % private data, unlimited executions
Quick comparison:
| Criteria | Cloud (n8n.cloud) | Self-hosted (Coolify + Contabo) |
|---|---|---|
| Installation | Immediate | Via Coolify in Docker (1 click) |
| Cost | From €20/month | €4.49/month (Contabo) |
| Performance | Limited according to plan | Unlimited executions |
| Security / control | Limited (SaaS) | Total (private hosting) |
🚀 Conclusion: if you're just starting out or have no server skills, the Cloud version is practical. But for serious, professional or unlimited use, self-managed hosting via Coolify + Contabo is unbeatable value for money.
Install N8N on Coolify (self-hosted)
Coolify is an open source platform that simplifies the deployment of applications like N8N on a VPS, with a user-friendly graphical interface.
⚙️ Prerequisites
- An active VPS (Contabo recommended, from €4.49/month)
- A custom domain (optional but recommended)
🚀 Installation steps
- Connect to your VPS via SSH
- Install Coolify with the official command:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash
- Access the Coolify interface via
http://votre-ip-du-vps:3000and create your admin account - Add an N8N application from the dashboard
- Deploy! One click and your N8N is online 🎉
🎯 Benefits no-code interface for deployment, easy upgrades, integrated monitoring, multiple apps on a single VPS.
AI Agents in N8N: Intelligent automation
What is an AI Agent?
AI agents are the next generation of intelligent automation. Unlike traditional linear workflows, an AI agent is an autonomous system capable of understanding a goal, making contextual decisions and acting accordingly, with or without human interaction.
AI agent vs. classic workflow
- 🧩 Classic workflow a sequence of predefined rigid steps (trigger → action 1 → action 2...)
- 🧠 AI agent a dynamic logic driven by a LLM (language model) able to think and adapt in real time
How an AI Agent works
An AI agent in N8N generally follows this pattern:
- Human or automated input (e.g. text message, voice command, webhook)
- Analysis and understanding of needs via a model such as GPT-4
- A logical decision Which action is most appropriate?
- Action Send an email, extract data, create an event, generate a document...
- User feedback (confirmation, result, error, follow-up)
When should you use an AI agent?
- When scenarios become too complex to code manually
- When you want "human" behavior in automation
- When the end-user must be able to interact freely (e.g. chatbot)
- When automation depends on contextual interpretation (sentiment analysis, summarization, intention extraction...)
💬 Example Instead of a simple "if new mail then add to Notion", an AI agent can understand the content of the mail, classify the intention, decide on the most appropriate action and even respond automatically in natural language.
Anatomy of an AI Agent
A high-performance AI agent relies on several essential components. Each plays a specific role in the system's intelligence, memory, logic and autonomy. Here are the 5 elements that make up the complete anatomy of an AI agent in N8N.
🧠 The Brain (LLM)
The heart of the agent is the LLM (Large Language Model) such as GPT-4, Claude, Mistral or Gemini. It can interpret messages, generate responses, analyze context, etc.
- Compatible models: ChatGPT (via OpenAI), Claude (Anthropic), Mistral (API), Perplexity, Gemini (Google)
- Recommendation: start with GPT-4, the most stable and complete
✍️ Prompting (Instructions)
The prompt defines the agent's role, rules and behaviors. It can be simple ("You're an HR assistant") or highly structured, with dynamic variables and business constraints.
- Examples of rules: professional tone, concise style, answer in French only...
- Best practices: separate blocks by function, comment on dynamic zones, avoid ambiguities
💾 Memory (Contextualization)
An agent with no memory forgets every exchange. To give continuity to the conversation or logic, it is necessary to store and reuse the context.
- Possible storage: variables in N8N, Google Sheets, Notion, Redis, SQL databases
- Enables: conversational follow-up, customer history, multi-step logic
📚 External Knowledge
The LLM has general knowledge. But to meet a specific business need, it needs to be connected to customized sources.
- Examples: PDF files, Google Sheets table, Airtable database, blog articles, internal FAQs
- Usable formats: JSON, plain text, vectors (embedding), database
🛠 Tools (Delegated actions)
The tools enable the agent to take action. They can be internal to N8N or called up via API.
- Examples: send an email, create a task, reserve a time slot, publish a post
- Compatible with: Google Calendar, WhatsApp, Discord, Trello, Slack, WordPress, Stripe, etc.
By combining these 5 elements - LLM + Prompt + Memory + External data + Tools - you get an AI agent that's intelligent, coherent, contextual and above all... useful.
How to create a simple N8N AI Agent (case study)?
Here's a concrete example of how to build an AI agent step by step in N8N. It's an intelligent assistant capable of understanding a text or voice message, extracting its intent, then executing a specific task (such as sending an email or creating an event).
Agent objective
The agent must understand a sentence like: "Make an appointment for me next Thursday at 2 p.m. with Julie." and automatically create an event in Google Calendar.
Construction stages
-
Trigger: a message received via a webhook, Telegram, WhatsApp or internal interface
-
Transcription (optional) If the message is a voice message, use a service such as
OpenAI WhisperorAssemblyAI -
Analysis of intent via an LLM (e.g. GPT-4):
- Task type (appointment scheduling, task creation, email sending, etc.)
- Extracted information: date, time, contact person, location
-
Tool call: event creation in Google Calendar
-
Confirmation: reply to the user (by chat or email)
Prompt used (simplified example)
Tu es un assistant personnel. Quand on te donne une phrase, tu dois extraire :
- Le type d'action (rdv, tâche, email)
- La date
- L'heure
- Le nom de la personne
Réponds uniquement en JSON avec les clés : type, date, heure, personne.
📤 Expected JSON result
{
"type": "rendez-vous",
"date": "2025-05-12",
"heure": "14:00",
"personne": "Julie"
}
Connection to external tools
Once the JSON has been parsed, the Google Calendar node allows you to create an event automatically by passing fields dynamically. You can then send a confirmation via another node such as Email, Slack or Telegram.
Voice variant
By adding a transcription node, this same scenario can be triggered by a voice note, enabling more natural interaction via mobile or voice assistant.
✅ This simple agent can then be used as the basis for more powerful versions: customer assistant, quote generator, HR agent, etc.
Adding "superpowers" to your agent
An AI agent can become much more than a simple text interpreter. By equipping it with powerful, specialized tools, you can transform a simple assistant into a true digital operator capable of acting in your business ecosystem.
Integration of external services
Add API connections to enable the agent to:
- Create or update customer files in Notion, Airtable, HubSpot...
- Manage appointments with Google Calendar or Calendly
- Send payments or check your balance via Stripe or PayPal
- Publish automatically on Slack, Discord, LinkedIn
- Send personalized dynamic emails
Multimodality: text, voice, image
An AI agent is not limited to text. It can understand or generate several types of content:
- Audio Transcribing voice notes with Whisper or AssemblyAI
- Image: image generation (via Sora, Gemini, DALL-E or Stability AI APIs) or analysis (OCR, ALT tags, content)
- PDF: reading and summarizing complex documents
Create specialized sub-agents
Divide your lead agent's responsibilities into several thematic sub-agents for greater clarity and precision:
- Customer support agent
- Accounting agent
- Content & SEO Agent
- Sales agent
Each sub-agent can use a specific prompt and tool, and be called by the main LLM according to the detected intent.
Modularity: calls to other workflows
You can split your agent into several modular workflows and call them from the Execute Workflow node. This allows:
- Better maintenance
- Optimized performance
- Clear division: logic, action, report, notification, etc.
💡 The more modular and specialized your agents, the more robust and scalable they become.
Advanced AI agent use cases
Once your AI agent is up and running, you can apply it to a wide range of business areas. Here are a few advanced scenarios, tested in production, that demonstrate the full potential of N8N coupled with AI.
Intelligent personal assistants
An agent who manages your appointments, sends you a daily recap, answers your simple emails and alerts you to emergencies.
- Input: WhatsApp, voice mic or email
- Action: create/modify events, send reminders, read incoming emails
Automatic newsletter writer
The agent collects the latest news from RSS feeds or Notion files, writes a newsletter structured in HTML, sends it via Sendinblue or Mailchimp, then publishes a summary on LinkedIn.
Industry Watch Agent
The agent monitors sites (scraping, feeds), summarizes what's new, classifies topics, generates alerts and proposes an internal action plan.
- Ex: "What new articles have been published this week in fintech?"
Billing & Collection Assistant
Using a database of invoices (Airtable, Notion, Google Sheets), the agent identifies late payments, writes a personalized reminder email, and updates the CRM.
AI customer support agent
The agent analyzes incoming requests (forms, emails, chat), sorts them by intent (info request, complaint, assistance...), and proposes an appropriate response or escalation to the right person: the ability to generate a dynamic FAQ, create tickets, and adapt the tone to each customer.
✅ All these use cases rely on the combination of a good prompt, access to contextual data, and automated action. N8N makes end-to-end orchestration possible, even without coding.
Limits & pitfalls to avoid
Even if AI agents are powerful, there are important technical and strategic limits to be aware of to avoid common mistakes. Here are the main pitfalls to be aware of.
Poorly structured prompts
A vague or ill-conceived prompt leads to inconsistent or dangerous results. The more precise your prompt, the more reliable the agent.
- Don't forget constraints (language, tone, output format)
- Use examples in the prompt to guide logic
Lack of memory / Forgotten context
Without a memory system or context re-injection, the agent "forgets" everything with each exchange. This can break the user experience or create logic errors.
- Use temporary storage (Google Sheets, Notion, Redis...)
- Re-inject history into prompt or LLM input
Security vulnerabilities
A poorly secured agent can expose your API keys, send unauthorized emails, or be abused via an open interface.
- Hide credentials
- Limit executable nodes
- Control access to webhooks
Latency and slowness
The more APIs or LLMs your workflow calls, the longer the response time. This can make for a frustrating experience.
- Choose fast models (flash, mini...)
- Add loading or progress messages
Risk of infinite loop
A poorly configured agent can call itself again or restart cascading actions, causing an infinite loop.
- Set safeguards (counters, end conditions, timers)
- Monitor execution with alerts for suspicious loops
A high-performance AI agent relies as much on rigorous design as on the power of LLM. Test, document, monitor.
MCP nodes in N8N
MCP nodes (Model Context Protocol) are a powerful new feature of N8N. They enable AI to act on tools such as Gmail, Notion or Google Calendar through a delegated tool mechanism, simplifying the management of complex AI agents. The concept is to implement an agent that calls sub-agents.
What is an MCP node?
An MCP node acts as a gateway between an AI agent and a concrete action (e.g. sending an email, creating a Notion page...). A distinction is made between:
- MCP Client Tool: node called by the AI agent
- MCP Server Trigger: background workflow containing executable actions (Gmail, Notion, etc.)
⚡ Native vs. community version
There are two approaches to using MCPs in N8N:
-
Community version (self-hosted):
- Each platform (Gmail, Notion...) has its own unique client MCP node
- More flexible, but requires manual configuration (Docker, API, keys, etc.)
-
Native version (integrated into N8N):
- A single generic MCP client calls an internal server (MCP Server Trigger)
- Less flexible but easier to configure
Configuration example
-
Create a main workflow with:
- Trigger:
On Chat Message - Node
AI Agentwith an LLM - Add an MCP Client Tool in tools
- Enter the server's SSE URL (copied from another MCP Server Trigger workflow)
- Trigger:
-
Create a second workflow with:
-
An MCP Server Trigger
-
Action nodes connected to it:
- 📧 Gmail →
send message - 📅 Google Calendar →
create event - 📘 Notion →
create page
- 📧 Gmail →
-
Each field is linked to a function
from AIwith key and description (e.g:start_date- "This is the start date of the event")
-
Benefits
- Allows actions to be called dynamically without redefining all prompts
- Centralizes tools by platform
- Modularity: ability to create specialized sub-agents or workflows
Current limits
- Not all platforms covered yet
- Less fine control than in the Community version
- Dependence on N8N interface for initial configuration
Understanding & implementing RAG with N8N: How AI can respond to your documents
With RAG, create an AI assistant that responds from your internal documents! AI customer service/support from your documents
What is a RAG?
You would like your AI to be able to answer questions based on your own documents Internal PDFs, technical manuals, procedures, general terms and conditions, customer databases...? That's exactly what RAG enables - a technique that combines two elements:
- Retrieval AI automatically searches your files for relevant passages
- Generation It then writes a complete response, in natural language, based on these passages.
Simply put, RAG transforms a generic chatbot like ChatGPT into a specialized intelligent assistant in your business or profession. And the good news is that you can do it without coding, directly in n8n.
Why use RAG?
An LLM like GPT doesn't know your internal business data. The RAG allows it to access this data without re-training the model:
- Query a corpus of PDF documents, customer files, internal procedures
- Answer specific questions without storing all the information in the prompt
- Update documents without changing the AI model
Simplified operation of a RAG
- Indexing: your documents (PDF, DOCX, text...) are cut into small pieces (chunks)
- Vectorization: each chunk is transformed into a vector (embedding)
- Storage: vectors are stored in a vector database (e.g. Supabase PGVector, Weaviate...)
- Querying: the user asks a question → transformed into a vector
- Search: the nearest chunks are retrieved
- Generation: these chunks are injected into a prompt with the question → final answer generated
A simple example
Question: "What is the VAT rate on travel expenses in 2024?"
➜ The agent searches the internal PDF files for those containing "VAT" and "travel expenses", retrieves the best extracts, and constructs a complete answer using LLM.
💡 In short: RAG enables your AI to become "your company's expert", without training it, simply by giving it access to your documents at the right time.
How to build a RAG pipeline in N8N
In N8N, it is possible to build a complete RAG-type pipeline using a suite of native nodes. This pipeline enables an AI agent to extract information from a set of documents (PDF, Markdown, TXT...) to generate contextual responses.
🗂 Step 1 - Ingestion of documents
- Use a Webhook, Email or Google Drive node to receive files automatically
- Supported formats: PDF, Markdown, DOCX, TXT, JSON, etc.
✂️ Step 2 - Chunking
-
Node:
Text Splitter -
Options:
- Character Splitter: splits by number of characters
- Recursive Splitter: intelligent splitting by sentence, paragraph, etc.
- Token Splitter: split by number of tokens (e.g. 500 tokens / chunk)
🧬 Step 3 - Embedding (vectors)
- Node:
Generate Embedding - Compatible vendors: OpenAI, Mistral, Cohere, HuggingFace
- Each chunk is transformed into a numerical vector (e.g. an array of 1536 numbers).
💾 Step 4 - Vector storage
- Node:
Vector Store - Compatible databases: Supabase (PGVector), Qdrant, Pinecone, Weaviate...
- Vectors are saved with metadata (title, source, timestamp, etc.).
🔍 Step 5 - Search by similarity
- Node:
Query Vector Store - The user question is transformed into a vector
- The system retrieves the most relevant chunks based on vector similarity
🧠 Step 6 - Generate final response
- Node:
LLM AgentorChat Completion - The prompt is enriched with the chunks found (in-context learning).
- The LLM writes the response in natural language, based on the content actually found.
Each step in the pipeline can be modularized and reused in different workflows or applications (support, customer assistant, HR chatbot, etc.).
Similarity queries
Once the documents have been vectorized and stored in a vector database, the AI agent can answer specific questions by retrieving the most relevant passages. This is the heart of the RAG mechanism: find the right context, then generate the right answer.
Query steps
- User question (via form, chatbot, voice interface...)
- Vector transformation via the same embedding model used for indexing
- Vector similarity search in the database (Top K results)
- Reinjection of retrieved chunks in a prompt with the question
- Answer generation via LLM (ChatGPT, Claude, Mistral...)
A simple example
Question: "Where can I find the claim form?"
➜ N8N transforms the question into a vector
➜ Supabase Vector Store query
➜ Return of the chunk containing: "The reimbursement form can be downloaded here: /docs/forms/reimbursement2024.pdf"
➜ LLM writes: "You can download the claim form here: /docs/forms/reimbursement2024.pdf"
Key nodes in N8N
Query Vector Storesearch in the vector databaseLLM Agentallows retrieved chunks to be supplied to the AI as "tools".Prompt dynamiqueyou can automatically inject the results into the instructions
Important tip
It is crucial that question embeddings and document embeddings come from the same model to ensure effective matching. Otherwise, the similarity will be erroneous or absent.
🔍 Result: your AI agent becomes able to find personalized answers in your business documents, even if they've never been seen by the original model.
Simple example: PDF → Question → Answer
Let's take a look at a concrete and complete case of RAG implementation in N8N. This example shows how a simple question posed by a user can trigger a search in a PDF, to produce an automatic personalized response.
📂 Source document
An internal PDF containing terms and conditions, FAQ, refund conditions, product notices... is uploaded via a form or automatically added to Google Drive.
⚙️ N8N workflow on the ingestion side
- Node Google Drive Trigger Monitoring the arrival of a new PDF file
- Node Read PDF extract the plain text of the document
- Node Text Splitter cutting into chunks of up to 400 tokens
- Node Generate Embedding transforms each chunk into a vector
- Node Vector Store stores vectors with metadata (title, client, date)
💬 N8N workflow on the user question side
-
Node Form Webhook or Telegram Bot: captures the user's question
-
Node Generate Embedding (from the question)
-
Node Query Vector Store Search for similar chunks
-
Node LLM (Chat Completion):
- Prompt: "Answer only from the following excerpts: {{chunks}}"
- Clear, structured response
-
Node Send Telegram or Email reply to the user
🧠 Example of a question asked
User: "How do I request a refund in the event of cancellation?"
Answer generated:
"In the event of cancellation, you can request a refund using the form available in Appendix C of the GTC document. You must send it within 14 days with proof of purchase."
📌 Result
- Instant, personalized response
- No need to train a model
- Documents can be updated without changing the system
💡 This architecture is ideal for automating customer support, internal assistants, intelligent FAQs and business document analysis.
Native RAG tools in N8N
N8N now offers a series of native nodes designed specifically to build RAG (Retrieval-Augmented Generation) pipelines without relying on external tools. Here are the main components available:
Text Splitter
Automatically cuts plain text into chunks (fragments), according to several logics:
- Character Splitter: cutting by fixed number of characters
- Recursive Splitter: intelligent division into paragraphs, sentences...
- Token Splitter: cut according to number of tokens (useful with GPT)
➡️ Ideal for structuring PDFs, web pages or emails prior to vectorization.
Generate Embedding
Transforms a text chunk into a vector (embedding), usable for similarity search. Compatible with:
- 🔷 OpenAI (text-embedding-ada)
- 🟧 Mistral embeddings (via Ollama or third-party APIs)
- 🟢 Hugging Face (open source models)
Vector Store
Stores vectors with their metadata in a vector database. Supports:
- 🟪 Supabase PGVector
- 🟦 Qdrant
- 🔶 Pinecone
- 🟧 Weaviate
Query Vector Store
Queries the vector database with a question vector. Returns the closest chunks according to cosine similarity.
LLM Agent
Central node for the final generation. It receives:
- 🔹 A prompt
- 🔹 A user question
- 🔹 Tools: context retrieved from chunks
➡️ Produces a complete and contextualized response thanks to the knowledge injection in real time.
Bonus: Prompt Builder & Tools Composer
Optional nodes for dynamically composing complex prompts or enriching the agent with multiple logic tools.
✅ Thanks to these bricks, N8N becomes a complete no-code/low-code platform for building intelligent document assistants or business AI.
Limitations and common errors in RAG
RAG is a powerful technology, but its implementation in N8N has a few pitfalls. Here are the most common mistakes to avoid, along with tips on how to get around them.
Poorly calibrated chunking
- Chunks too short ➜ Loss of context
- Chunks too long ➜ Truncation or excessive cost of inference
- Best practice: test sizes between 300 and 600 tokens depending on the case
Inconsistent embeddings
- Use a different embedding model for question and documents ➜ vector correspondence impossible
- Best practice: standardize the model for indexing and querying
Poorly structured vector storage
- No metadata ➜ difficult to filter or contextualize
- No logical grouping ➜ queries too noisy
- Best practice: enrich each chunk with tags (e.g. title, author, type...)
Ill-conceived prompt
- Prompt too vague ➜ vague or hallucinated response
- No explicit limit ➜ LLM "invents" if it finds nothing
- Best practice: add a clause such as: "If you don't have the answer in the extracts, say so clearly."
Poorly filtered context injection
- Injection of irrelevant chunks ➜ cognitive overload for LLM
- No score or top-k logic ➜ noise in response
- Best practice: filter results by similarity score or reliable source
Security risks
- Injection of unfiltered documents ➜ potential data leakage
- No control over submitted documents ➜ AI exposed to malicious content
- Best practice: validate files upstream, log sensitive requests
✅ A well-thought-out RAG architecture provides precise, reliable and contextual answers. But without rigor, the system can become vague, inefficient or imprecise.
Bonus resources
Here are some essential resources to help you master N8N and AI agents. Keep them safe!
🎁 JSON template library to import
N8N lets you export and import workflows as JSON files. Here's what you'll find in a good library:
- Automated monitoring workflows
- Incoming email management
- Ready-to-use conversational AI agents
- Connection to Google Sheets, Notion, Discord, etc.
💡 Tip: create your own database of reusable templates by theme or customer.
📄 JavaScript & dynamic expressions cheatsheet
In N8N, expressions are based on JavaScript. Here are some useful shortcuts:
{{$json["email"]}}→ retrieve the email field of a previous node{{new Date().toISOString()}}→ generates the current date/time{{$node["Calendrier"].json["start_time"]}}→ retrieve a specific value from a node named "Calendrier".
💡 Remember to always test your expressions in the built-in editor.
🔧 List of compatible no-code tools
N8N integrates perfectly with a wide range of no-code tools:
- 📋 Forms: Tally, Typeform, Paperform
- 📊 Databases Airtable, Baserow, NocoDB
- 📬 Emailing MailerLite, Sendinblue, Mailchimp
- 🧠 AI / NLP: OpenAI, HuggingFace, Claude
- 📦 Storage Google Drive, Dropbox, Supabase
- 🧰 Monitoring Uptime Kuma, Plausible, Cronitor
📘 N8N Communities
To progress, exchange ideas or get help:
🚀 The more you practice, the more you'll be able to create your own agents, services or products based on intelligent automation.