Templates / Build a cost engineering RAG with Google Drive, OpenAI, and Pinecone

Build a cost engineering RAG with Google Drive, OpenAI, and Pinecone

Ready for 3.0

by Alysson Neves ✓ · 170 views · created 2026-06-10 · Document Extraction, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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).

  1. Get Ingestion Settings (Execute Sub-workflow): calls another n8n workflow
  2. Get Retrieval Settings (Execute Sub-workflow): calls another n8n workflow
  3. Define Knowledge Base Configuration (Edit Fields (Set)): sets 3 fields: sourceFolderID, processedFolderID, pineconeIndex
  4. Load Ingestion Configuration (Edit Fields (Set)): sets 3 fields: sourceFolderID, processedFolderID, pineconeIndex
  5. Load Retrieval Configuration (Edit Fields (Set)): sets 3 fields: documentosRecebidos, documentosProcessados, pineconeIndex
  6. List Pending Documents (Google Drive): work with file folder
  7. Answer Query Using Knowledge Base (AI Agent): runs an AI agent, with model: Generate Answer; 1 tool (Retrieve Relevant Documents)
  8. Download Source Document (Google Drive): download
  9. Extract PDF Content (Extract from File): extracts data from a file (pdf)
  10. 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

Google DriveEmbeddings OpenAIPinecone Vector StoreOpenAI Chat Model

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)

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…

Excerpt from Alysson Neves's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.