Build an advanced RAG chatbot using this n8n workflow template. It manages Google Drive document ingestion, uses Mistral AI for OCR and embeddings, and stores data in Qdrant for fast retrieval.
Download this n8n workflow template and start using it instantly.
Automation specialists seeking advanced RAG solutions.
Companies needing a high-performance knowledge base chatbot for their website.
Developers looking for an example of a multi-step n8n document processing pipeline.
Technical users wanting to integrate Mistral AI’s powerful OCR and embedding services with an n8n workflow.
This comprehensive n8n workflow addresses the challenge of making unstructured, brand-specific documents (like PDFs, guides, or reports stored in Google Drive) instantly searchable and usable by an AI chatbot. It operates in two major phases: a Document Ingestion Pipeline and a Real-Time Chat Agent.
The ingestion pipeline uses the robust combination of Mistral AI’s specialized OCR services and custom chunking logic within an n8n node to efficiently process documents, extract key data, and prepare it for embedding. The resulting vector data is stored in Qdrant. This ensures the chatbot, powered by an OpenAI model, has the highest quality, most relevant knowledge available. This powerful n8n workflow provides a scalable, context-aware conversational experience for website visitors, dramatically enhancing customer support and engagement by leveraging your existing document assets.
This n8n workflow template is divided into two distinct logical branches: the Data Ingestion Pipeline (for building the knowledge base) and the Chat Agent (for responding to live queries).
When clicking ‘Execute workflow’ n8n trigger, initiating the data load. Google Drive(brand related data for chatbot) n8n node fetches a list of files from a specified folder ID containing brand knowledge documents.Loop Over Items1). For each file, metadata is set, and the file is downloaded using the Google Drive(load file) n8n node.Mistral Upload, a signed URL is retrieved (Mistral Signed URL), and the document is processed for text extraction using the Mistral DOC OCR HTTP Request node. This ensures text is extracted accurately even from complex document types.prepare for chunking).Code(convert to chunks for loading into vector db) n8n node executes custom logic to split the potentially large OCR output into optimally sized chunks (1000 characters) suitable for vector storage, ensuring relevant retrieval.Embeddings Mistral Cloud n8n node and then inserted into the designated Qdrant collection (Qdrant Vector Store1). This completes the knowledge base setup.When chat message received LangChain n8n trigger (for integrated chat) or an external Webhook.website chat agent LangChain n8n node receives the user query. This agent is configured with strict system instructions (rules 1-8 in the prompt) mandating it to use the vector database as its primary source.Qdrant Vector Store tool, which uses Embeddings Mistral Cloud1 to embed the user's query and retrieve contextually relevant documents from the vector database.Simple Memory), is fed to the OpenAI Chat Model (GPT-4o mini) to generate the final, authoritative response, ensuring answers are based only on the provided documents. The final output is returned to the user via the initial n8n trigger or webhook.To deploy this powerful n8n workflow, follow these steps:
OpenAI Chat Model n8n node.Mistral Upload, Mistral DOC OCR).Qdrant Vector Store n8n node instances.Google Drive n8n node to access your document folder.Google Drive(brand related data for chatbot) n8n node, update the 'Folder ID' parameter to point to the specific Google Drive folder containing your knowledge base documents.Qdrant Vector Store n8n node instances, ensure the 'Qdrant Collection' parameter is set to your target collection name (e.g., docragtestkb). When chat message received (n8n trigger): The primary entry point for embedded chat solutions. It waits for incoming user queries to fire the n8n workflow.
Google Drive (n8n node): Used to list files from a designated folder and then download individual files for processing in the ingestion pipeline.
Set metadata (n8n node): A utility node used to extract critical file metadata (ID, title, URL) from the Google Drive item, which is then passed through the pipeline and used to enrich the chunk metadata.
Mistral DOC OCR (HTTP Request n8n node): Crucial for the ingestion pipeline. It interacts with the Mistral AI API to perform Optical Character Recognition on uploaded documents, converting complex file formats into extractable, structured text.
Code(convert to chunks for loading into vector db) (n8n node): This custom n8n node contains sophisticated JavaScript logic to ensure optimal document chunking (1000 characters), which is vital for efficient RAG retrieval.
Embeddings Mistral Cloud (n8n node): Used twice in this n8n workflow—once for generating embeddings for the documents being ingested, and once for generating embeddings for the live user query.
Qdrant Vector Store (n8n node): Used for both data insertion (ingestion branch) and as a 'retrieve-as-tool' (chat branch) within the LangChain agent framework. This is the core knowledge storage mechanism.
OpenAI Chat Model (LangChain n8n node): Serves as the Large Language Model (LLM) engine (specifically GPT-4o mini) for the agent, generating final responses based on retrieved context.
Build a robust API and website health monitoring system using this customizable n8n workflow. Validate HTTP status codes and response JSON health indicators instantly. Great n8n template for DevOps.

Automate website change detection using this powerful n8n workflow. Use hashing to track public documents, log changes to Google Sheets, and receive Gmail alerts.

Use this n8n workflow to instantly fetch random cocktail recipes from an external API and post them to Mattermost channels via a webhook. A perfect example of useful n8n templates.

Use this powerful n8n workflow to capture website leads instantly. Automatically notify your team via Slack and send professional confirmation emails using Gmail or Outlook. Get started with this n8n template today.

Automate website scraping and AI analysis using this powerful n8n workflow. Extract key content insights with GPT-4 and instantly save the structured data to Google Sheets using this n8n template.

Create an advanced RAG chatbot using this comprehensive n8n workflow template. Scrape website content, generate OpenAI embeddings, index in Pinecone, and use the n8n node ecosystem to integrate live Airtable data.

Digital Biz Tech empowers organizations to unlock their knowledge and creativity with AI. From zero-retention assistants that deliver secure, source-linked answers to intelligent content engines that generate and schedule on-brand campaigns, we transform how teams access, create, and act on information. 📩 For consulting or collaborations, contact [email protected]







































