Process OCR documents from Google Drive into searchable knowledge base with OpenAI & Pinecone
Ready for 3.0What this workflow does
This AI workflow has 9 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive, Embeddings OpenAI and Pinecone Vector Store.
How it runs
Trigger: On Google Drive events (file created).
- Filename → Lesson Metadata (Code): runs custom JavaScript code
- Download file (Google Drive): download
- Vision JSON → Clean Text Chunks (Code): runs custom JavaScript code
- Insert into Pinecone Vector Store (Pinecone Vector Store): stores documents in the Pinecone vector store, with embeddings: Generate Embeddings (OpenAI); document loader: Default Data Loader
- Move File to Archive (Google Drive): move
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Google Drive
n8n-nodes-base.googleDrive - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Code
n8n-nodes-base.code - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone
From the author
How it works This workflow automates a full RAG ingestion pipeline. When a new OCR JSON file is added to a Google Drive folder, the workflow extracts lesson metadata, parses and cleans the Arabic text, generates semantic chunks, creates AI embeddings, and…