Build a cost engineering RAG with Google Drive, OpenAI, and Pinecone
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs on a schedule (every 2 minutes) (plus 2 other triggers). Along the way it connects Google Drive, Embeddings OpenAI, Pinecone Vector Store and OpenAI Chat Model.
How it runs
Trigger: On a schedule (every 2 minutes) (plus 2 other triggers).
- Get Ingestion Settings (Execute Sub-workflow): calls another n8n workflow
- Get Retrieval Settings (Execute Sub-workflow): calls another n8n workflow
- Define Knowledge Base Configuration (Edit Fields (Set)): sets 3 fields: sourceFolderID, processedFolderID, pineconeIndex
- Load Ingestion Configuration (Edit Fields (Set)): sets 3 fields: sourceFolderID, processedFolderID, pineconeIndex
- Load Retrieval Configuration (Edit Fields (Set)): sets 3 fields: documentosRecebidos, documentosProcessados, pineconeIndex
- List Pending Documents (Google Drive): work with file folder
- Answer Query Using Knowledge Base (AI Agent): runs an AI agent, with model: Generate Answer; 1 tool (Retrieve Relevant Documents)
- Download Source Document (Google Drive): download
- Extract PDF Content (Extract from File): extracts data from a file (pdf)
- Store Document Embeddings (Pinecone Vector Store): stores documents in the Pinecone vector store, with embeddings: Generate Embeddings; document loader: Convert Text to Documents
…plus 1 more step. See the full node list below.
Services it uses
Other OpenAI + Google Drive templates (628) · Other OpenAI + Pinecone templates (128) · Other Google Drive + Pinecone templates (65)
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 (14)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Drive
n8n-nodes-base.googleDrive - Extract from File
n8n-nodes-base.extractFromFile - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - No Operation, do nothing
n8n-nodes-base.noOp - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick Overview This workflow ingests PDF cost-engineering manuals from Google Drive into a Pinecone vector index using OpenAI embeddings, then answers user questions via an n8n chat webhook using a retrieval-augmented OpenAI agent that responds only with…