Use this powerful n8n workflow to create a conversational AI agent capable of reading and answering questions based on complex multi-format file uploads (PDF, CSV, images, JSON). Leverage OpenAI and Gemini for advanced RAG capabilities.
Download this n8n workflow template and start using it instantly.
This sophisticated n8n workflow offers a two-pronged approach to AI-powered document interaction. First, it provides a dedicated intake mechanism (a standard form n8n trigger) to load long-term knowledge documents into an in-memory vector store, establishing the Retrieval-Augmented Generation (RAG) base. Second, and more uniquely, it features a primary chat interface (the chat n8n trigger) that allows users to ask questions while simultaneously uploading various file formats (PDF, images, CSV, JSON, XML, etc.).
The automation automatically routes the uploaded file based on its MIME type, extracting the relevant content before feeding it, alongside the user's prompt, into the AI Agent. This ensures the agent considers both the static knowledge base (via the RAG tool) and the immediate context provided by the uploaded files, making this n8n template highly versatile for complex data queries.
The entire process is initiated by one of two n8n trigger nodes.
image/jpeg, application/pdf, text/csv) and routes the item to the appropriate extraction pipeline (using a combination of Convert to File and format-specific Extract from File n8n nodes).To deploy this comprehensive n8n workflow, follow these steps:
a4611591).511e0c19 and 7d38210e). When chat message received (n8n trigger): The primary conversational entry point. Key feature is allowFileUploads: true, enabling users to upload documents while chatting.
On form submission (n8n trigger): Used exclusively for loading long-term documents into the vector store. Configured to accept file inputs.
Switch (n8n node): Crucial for multi-format support. It evaluates the incoming file's mimeType and routes the data specifically for extraction (e.g., application/pdf, text/csv, image/).
Extract from File (n8n nodes): A suite of dedicated n8n nodes configured with operations like pdf, fromJson, xml, xlsx, and rtf to handle structured and unstructured data extraction from binary files.
AI Agent (n8n node): The core intelligence, orchestrating the request. Its system message guides it to use the uploaded file content (extractedFile) and the RAG tool for answers.
OpenAI Chat Model (n8n node): Used as the generative language model, connected to the AI Agent.
Window Buffer Memory (n8n node): Ensures session continuity by tracking the conversation history using the user's sessionId provided by the chat n8n trigger.
retrieve-as-tool mode. This is the RAG component that allows the AI Agent to query the pre-loaded knowledge base, significantly expanding the scope of what this n8n workflow can answer.Build an advanced RAG-powered AI voice agent using this n8n workflow template, integrating Supabase vector storage and Google Gemini (Vertex AI) for accurate customer support responses.

Use this powerful n8n workflow to build a custom RAG knowledge base. Upload files via an n8n trigger, embed data using OpenAI, and query context with an AI agent for advanced retrieval.

Learn how to build a scalable Retrieval-Augmented Generation (RAG) solution using n8n workflow templates. This n8n automation integrates Supabase for vector storage, TogetherAI for embeddings, and OpenRouter for cost-effective LLM access.

Build a comprehensive RAG pipeline using an n8n workflow. Sync Google Drive documents to Pinecone Assistant and enable real-time, context-aware chatting with OpenAI integration. Explore powerful n8n templates for AI.

Use this advanced n8n workflow to automate RAG data preparation. It pulls documents from Google Drive, uses an AI agent (via OpenRouter/Gemini) for context-aware chunking, and indexes the enriched vectors in Pinecone. Leverage powerful n8n templates for superior vector search.

Use this advanced n8n workflow to aggregate, filter, and format news from multiple RSS feeds, automatically posting updates to Trello cards and notifying your team via Gmail. Highly efficient n8n templates for content curation.








































