PDF Proposal Knowledge Base RAG System with S3 and Qdrant - n8n Workflow

Create a powerful RAG knowledge base using this advanced n8n workflow. Automate PDF ingestion from S3, leverage OpenAI embeddings, and deploy a GPT-4o agent powered by Qdrant.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Technical teams or developers looking to deploy a scalable RAG solution.

  • Businesses needing to index and search large volumes of internal documentation, such as proposals or reports.

  • n8n users seeking advanced examples of LangChain integration and custom AI agents.

  • Automation specialists who need to integrate cloud storage (AWS S3) with vector databases (Qdrant) in an n8n workflow.

Overview

This comprehensive n8n workflow provides a complete solution for transforming unstructured PDF data into a queryable knowledge base. It operates in two parallel pipelines: ingestion and query. The ingestion pipeline automatically pulls PDF files from an AWS S3 bucket, extracts their content, chunks the text, generates embeddings using an n8n node for OpenAI, and stores them in Qdrant. The query pipeline uses a specialized n8n Agent node, powered by GPT-4o, which accesses the Qdrant store as a retrieval tool. This system ensures that the AI responses are grounded in the specific knowledge found within your proposal documents, demonstrating a highly effective application of n8n templates for enterprise use cases. Mastering this type of n8n workflow significantly enhances data accessibility and AI utility.

How it Works

This n8n workflow is divided into two distinct logical flows, both maximizing the utility of the n8n platform:

1. The Data Ingestion Flow (Indexing)


  1. Manual Trigger: The process starts with the 'When clicking ‘Test workflow’' n8n trigger, initiating the indexing process manually.

  2. S3 File Listing: The 'Get Files from S3' n8n node connects to AWS S3 to retrieve a list of all files in the designated bucket.

  3. Iteration and Download: The workflow uses the 'Loop Over Items' n8n node to process each file individually. The 'Download Files from AWS' n8n node then retrieves the actual PDF binary content using the file key.

  4. Content Extraction: The 'Extract from File' n8n node is configured specifically to handle the PDF operation, extracting the raw text content.

  5. Preparation and Splitting: The extracted text flows through the 'Recursive Character Text Splitter' n8n node, which ensures large documents are broken into optimal chunks for embedding. The 'Default Data Loader' prepares the data structure.

  6. Embedding and Vectorization: The 'Embeddings OpenAI' n8n node generates vector representations for each text chunk. Finally, the 'Qdrant Vector Store' n8n node inserts these vectors, completing the knowledge base creation.

2. The Conversational Agent Flow (Querying)


  1. Chat Trigger: The 'When chat message received' n8n trigger starts this flow whenever a user submits a query.

  2. AI Agent Configuration: The core logic is managed by the 'AI Agent' n8n node. This agent utilizes the 'OpenAI Chat Model' n8n node (set to gpt-4o-mini) as its reasoning engine.

  3. RAG Tool Access: A second 'Qdrant Vector Store1' n8n node is configured in retrieve-as-tool mode. This tool, named proposalknowledgebase, allows the AI Agent to perform similarity searches against the indexed data. The agent seamlessly incorporates retrieved context into its response, ensuring factual accuracy based on the original PDF data. This sophisticated setup showcases the power of building complex n8n templates.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import: Copy the provided JSON and import it into your n8n instance via the 'New' menu -> 'Import from JSON'.

  2. Credentials Setup: You will need to configure credentials for the following services:

AWS S3: Set up AWS credentials for accessing YOURS3BUCKET with read/download permissions.
OpenAI: Set up OpenAI credentials for both the Embeddings n8n node and the Chat Model n8n node.
Qdrant: Set up Qdrant service credentials (API key and URL).

  1. Update Parameters: Locate the following n8n nodes and update their placeholder values:

Get Files from S3 and Download Files from AWS: Replace YOURS3BUCKET with your actual bucket name.
* Qdrant Vector Store and Qdrant Vector Store1: Replace YOURQDRANTCOLLECTION with the name of your target Qdrant collection.

  1. Activate and Test: Activate the n8n workflow. For ingestion, click 'Test workflow' on the manual n8n trigger. For testing the agent, use the LangChain Chat Trigger interface.

Node Details

This n8n workflow leverages several specialized n8n nodes for RAG implementation:

When clicking ‘Test workflow’ (Manual Trigger): The starting n8n trigger for the data ingestion phase. Essential for testing and one-off indexing runs.
Get Files from S3 & Download Files from AWS (AWS S3 n8n node): Handles listing files and then downloading the binary content of PDFs from the specified S3 location.
Extract from File (Extract From File n8n node): Crucial for extracting text content from the PDF binary data before processing.
Recursive Character Text Splitter (Text Splitter n8n node): Splits large PDF text into manageable chunks, optimizing them for effective embedding and retrieval. This is a vital part of any RAG n8n workflow.
Embeddings OpenAI (OpenAI Embeddings n8n node): Generates high-quality vector embeddings necessary for storing data in Qdrant and enabling semantic search.
Qdrant Vector Store (Qdrant Vector Store n8n node): Used in two modes. First, for insert (ingestion), and second, as 'Qdrant Vector Store1' for retrieve-as-tool (query), acting as the knowledge base tool for the AI Agent.
OpenAI Chat Model (Chat OpenAI n8n node): Provides the large language model backend, configured here to use gpt-4o-mini for efficient conversational processing within the n8n workflow.
AI Agent (Agent n8n node): The brain of the query pipeline, coordinating the use of the Qdrant tool to answer user questions based on the ingested PDF data. This demonstrates a sophisticated use of a core n8n node.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by
Joe Swink
Joe Swink

Featured*