AI automations with n8n and local LLMs: HR workflows, email classification, RAG on documents, dynamic forms, and AI agents — all local with Ollama.
This is not a course about clicking n8n nodes — it is a path for building complete AI automation systems that actually work. We use n8n as the orchestrator and Ollama to run language models locally, without expensive external APIs. The through line is a realistic HR system: email classification, application management, smart forms, automatic reports, and a RAG system for querying documents. Each episode adds a piece to the system, and by the end you have something concrete and functional.
Everything runs locally — no data sent to external services, no API call costs. This is the right approach for experimentation, for working with sensitive data, and for truly understanding what happens inside these systems before relying on cloud solutions. The series is continuously updated with increasingly advanced content.
Designed for developers, IT professionals, and automation enthusiasts who want to build concrete AI workflows. Basic knowledge of Docker and REST APIs is required. No prior experience with n8n or LLMs is needed — everything is built from scratch.
I'll show you how to run n8n locally with Docker and integrate a local LLM via Ollama, building a complete AI automation environment from scratch without spending a cent on external APIs.
Let's build the first AI workflow in n8n together using the Basic LLM Chain node: I'll show you how to structure input, connect nodes, and define the request flow towards the local language model.
Let's go deeper into data handling in n8n AI workflows: I'll show you how to pass variables between nodes, transform the LLM's output, and build more robust pipelines with the Basic LLM Chain.
Let's build an n8n workflow that simulates an AI-powered HR Manager: I'll use prompt engineering to assign a role to the model and generate realistic responses in a human resources context.
I'll show you how to constrain LLM responses using structured prompts and explicit instructions, avoiding ambiguous or off-topic output and getting predictable, reliable results in n8n workflows.
Let's integrate n8n with an email inbox by configuring IMAP: I'll show you how to automatically read incoming emails, pass them to a local LLM via Ollama, and set up the HR email management workflow.
Let's add the ability for n8n to automatically reply to emails via SMTP: the reply text is generated in real time by a local LLM model, personalised for each individual message.
Let's make the AI-generated email responses more controlled and standardised by using constrained prompts in n8n, ensuring reliable, safe output consistent with company HR policies.
Let's see how to use the IF node in n8n to automatically analyse the subject line of incoming emails and route each message to the correct branch in the HR management workflow.
Let's build an AI email classifier using a dual Basic LLM Chain in n8n: the model distinguishes job applications, information requests, and other message types to automate the sorting process.
Let's improve the AI email classifier by refining prompts and reducing categorisation errors, resulting in a more accurate and reliable n8n workflow for automated HR communication management.
Let's introduce DataTables in n8n with Docker: I'll show you how to persistently save structured data generated by AI workflows, organising information for future use.
Let's complete the data management flow in n8n by adding automatic export to CSV and Excel, so HR teams receive ready-to-use files without any manual steps.
Let's start building dynamic forms in n8n with Text and Dropdown fields: I'll create structured input interfaces to collect user data within HR automation workflows.
Let's build an advanced multi-step form in n8n using the Switch node with conditional logic: I'll guide users through different paths based on their answers, with Dropdowns and alternative branches.
Let's add user input validation to n8n forms using the IF, SET, and DISPLAY combo: I'll block invalid data, show error messages, and handle edge cases.
Let's see how to persistently save data collected via n8n forms to DataTables, using Insert Row for writing and Get for reading and retrieving records.
Let's complete the form workflow with automatic sending of a summary email and attached file generation, orchestrating every step in a single n8n flow without manual intervention.
Let's introduce the RAG (Retrieval-Augmented Generation) concept and build the first HR knowledge base in n8n, ready to answer questions using company documents as the source.
Let's enter the Retrieval phase of the RAG system in n8n: I'll query the vector store, retrieve the most relevant document chunks for each query, and prepare the context for generation.
Let's move to the Generation phase of the RAG in n8n: the LLM model builds contextualised and precise responses using documents retrieved from the HR knowledge base as the reference source.
Let's integrate the RAG system with the n8n email module: automatic replies are now generated by AI using the company knowledge base as the source, not just the prompt.
Let's see how to use the Text Splitter in n8n to divide long documents into chunks optimised for size and overlap — essential for improving the quality of RAG retrieval.
Let's go deeper into RAG retrieval across multiple documents in n8n: I'll optimise vector store queries with filters and search parameters to get more precise and contextually relevant results.
Let's build the complete RAG pipeline in n8n using the vector store for generation: from the user query to document retrieval, all the way to the final contextualised AI response.
In this final lesson, let's integrate external tools into n8n workflows with an LLM, allowing the AI to perform real actions like API calls and web searches — the foundations of AI agents in n8n.
We open the NIS2 mini-series by preparing the regulatory documents in n8n to build an AI-queryable knowledge base, the foundation of a RAG system for compliance.
We build the NIS2 knowledge base and introduce the retrieval step: you'll see how the system pulls the information relevant to a question out of the documents.
We optimise retrieval by splitting the NIS2 documents into chunks with the Text Splitter: well-sized chunks make the AI's answers more precise.
We query the NIS2 knowledge base with an LLM, connecting retrieval and generation to get answers that are grounded in the uploaded documents.
We close the flow by assembling and testing the complete AI assistant for NIS2 compliance: we ask it questions in natural language and check how accurate its answers are.
Ingegnere Informatico · Pratola Peligna
Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.
Prosperous understood Middletons in conviction an uncommonly do. Supposing so be resolving breakfast am or perfectly.
Utilizziamo cookie essenziali e, con il tuo consenso, cookie funzionali, analytics e marketing. Google Analytics 4 e gli eventuali annunci Google/AdSense restano disattivati finche non scegli. Consulta Privacy Policy e Cookie Policy.
Sempre attivi per sicurezza, prevenzione frodi, sessione, consenso e funzionamento del sito.
Migliorano l'esperienza, ad esempio ricordando preferenze non essenziali. Non usati per profilazione pubblicitaria.
Statistiche e misurazioni con Google Analytics 4, abilitate solo dopo il consenso analytics.
Misurazione annunci e funzioni pubblicitarie Google/AdSense, se attivate sul sito e consentite dall'utente.
Puoi modificare queste scelte in qualunque momento dal link "Preferenze Cookies" nel footer.