Build a RAG System for PDF Documents with Google Drive, Unstructured, and OpenAI
This template monitors a Google Drive folder, converts PDF documents into clean text chunks with Unstructured, generates OpenAI embeddings, and upserts vectors into Pinecone. It’s a practical, production-ready starting point for Retrieval-Augmented Generation (RAG) that you can plug into a chatbot, semantic search, or internal knowledge tools.
How it works
- Google Drive Trigger detects new files in a selected folder and downloads them.
- The files are sent to Unstructured where they are split into smaller pieces (chunks).
- The chunks are prepared to be sent to OpenAI where they are converted into vectors (embeddings).
- The embeddings are recombined with their original data and the payload is prepared for upsert into the Pinecone index.
Set up steps
- In Pinecone, create an index with 1536 dimensions and configure it for text-embedding-3-small.
- Copy the host url and paste it on the 'Pinecone Upsert' node. It should look something like this: https://{your-index-name}.pinecone.io/vectors/upsert.
- Add Google Drive, OpenAI and Pinecone credentials in n8n.
- Point the trigger to your ingest folder (you can use this article for demo).
- Click the 'Open chat' button and enter the following: Which Git provider do the authors use?
Related Templates
Track Demo Bookings with Google Calendar to Meta Conversions API Integration
Who is this workflow for? If you're using Meta Ads to generate new leads to your sales pipeline, this workflow is for yo...
Transcribe & Summarize Audio with Whisper and GPT, from Google Drive to Notion
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Overview This work...
Reusable and Independently Testable Sub-workflow
Reusable and Independently Testable Sub-workflow This n8n workflow provides a standardized structure for building and te...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments