Automate document processing using this advanced n8n workflow. It uses Mistral AI and Qdrant vector database for RAG to break down source files into study guides, timelines, and briefing docs.
Download this n8n workflow template and start using it instantly.






















Students and educators needing automated study material generation.
Knowledge managers seeking to convert long documents into actionable briefing materials.
Users looking for advanced examples of RAG and AI agent integration within an n8n workflow.
Developers seeking robust, real-world n8n templates utilizing vector databases like Qdrant.
This sophisticated n8n workflow addresses the challenge of manually synthesizing large documents into useful, structured study materials. By leveraging Retrieval-Augmented Generation (RAG) powered by the Qdrant vector store and Mistral AI models, this automation ensures accuracy and contextual relevance in the output. The primary goal of this n8n template is to take any uploaded source file (PDF, DOCX, TXT) and generate three predefined template documents: a Study Guide, a Timeline, and a Briefing Document. The core of this n8n workflow relies on a chain of AI agents (Mistral Cloud Chat Model) that interview the vectorized source material to generate high-quality, structured notes. This n8n workflow is perfect for maximizing productivity and creating custom n8n templates for specific documentation needs.
Local File Trigger, an essential n8n trigger, which monitors a specified directory for new file additions (specifically /home/node/storynotes/context). The file path is captured and processed by the Import File n8n node.Switch n8n node (Get FileType) directs the file to the appropriate Extract from... n8n node based on its type (PDF, DOCX, Text), preparing the raw text.Summarization Chain (powered by Mistral AI). Simultaneously, the text is split by the Recursive Character Text Splitter and converted into embeddings using Embeddings Mistral Cloud. These embeddings are stored in the Qdrant Vector Store (collection 'storynotes') to build the RAG knowledge base.Get Doc Types): Study Guide, Timeline, and Briefing Doc. The Split Out Doc Types and For Each Doc Type... n8n nodes initiate a loop, ensuring each template is generated sequentially.Interview LLM Chain generates guiding questions based on the document summary. The subsequent Discover n8n node (a Retrieval QA Chain) uses these questions to query the Qdrant vector database, retrieving contextually relevant chunks of the original document. This retrieval process utilizes another Mistral Cloud Chat Model to formulate precise answers based on the context.Generate LLM Chain constructs the full, formatted template document (using the specific instructions for Study Guide, Timeline, etc.). The resulting markdown content is converted to binary using the To Binary n8n node and written back to the local disk using the Export to Folder n8n node, completing the execution of this complex n8n workflow.Local File Trigger n8n node (a3af309b) to watch the directory where you will drop your source documents (e.g., PDF or DOCX files). The current path is set to /home/node/storynotes/context.storynotes. Local File Trigger (n8n trigger): The starting point of the n8n workflow. Monitors a local folder for new files, providing the path as input.
Get FileType (n8n node): A Switch node that inspects the file extension and routes the data stream to the correct extraction node (PDF, DOCX, or TEXT).
Summarization Chain (Langchain n8n node): Uses the Mistral Cloud Chat Model1 to quickly generate a summary of the source document, which is later used to guide the template generation process.
Qdrant Vector Store (Langchain n8n node, Insert Mode): The core component for RAG. It takes embeddings generated by the Embeddings Mistral Cloud n8n node and inserts the document chunks into the storynotes collection.
For Each Doc Type... (n8n node): A Split In Batches n8n node that loops through the predefined documentation templates (Study Guide, Timeline, Briefing Doc).
Interview (Langchain n8n node): An LLM Chain powered by Mistral AI that generates relevant, guiding questions based on the document summary for the specific template being created.
Discover (Langchain n8n node): A sophisticated RetrievalQa Chain that uses the questions generated in the previous step to perform semantic searches against the Qdrant vector database, ensuring accurate context retrieval for the final answer generation.
Generate (Langchain n8n node): The final LLM Chain that synthesizes the aggregated, retrieved context into the final formatted Markdown document, following the detailed instructions of the specific template.
Automate LLM brand visibility research using this advanced n8n workflow. Query OpenAI, Perplexity, and ChatGPT, perform sentiment analysis, and store results in Google Sheets. Utilize complex n8n templates.

This powerful n8n workflow automates Brand DNA generation from JotForm submissions. It uses SerpAPI for search, AI extraction (Gemini/OpenRouter) to synthesize insights, and saves the final report to Notion.

Use this powerful n8n workflow to automatically boost recent statuses from a trusted external account onto your Mastodon profile daily using the n8n HTTP node. Find more n8n templates here.

Automate daily regulatory monitoring using an n8n workflow. Scrape official sites, score impact using AI, send urgent SendGrid alerts, and store data in PostgreSQL for compliance teams.

Automate competitive price monitoring using n8n and Bright Data. This n8n workflow reads products from Google Sheets, scrapes prices, uses AI (Gemini) for analysis, and generates a detailed email report.


Freelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at [email protected] LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk







































