Company RAG and data queries

Google Drive to Pinecone retrieve-as-tool RAG agent workflow

Short answer

This n8n workflow converts a Google Drive PDF into a focused Pinecone knowledge tool in 12 functional nodes. It fetches the document, chunks text at 3,000 characters and clears the target Pinecone namespace before inserting OpenAI embeddings. Incoming chat queries route to an OpenAI gpt-4o-mini agent.

Catalogue ID
#0326
Functional nodes
12
Connections
10
Trigger
manualTrigger, chatTrigger
AI layer
AI-assisted
Business problem solved

Business problem solved

Teams frequently need a clean, lightweight way to query long technical whitepapers or handbooks without managing complex multi-service pipelines. Re-running ingestion without clearing namespaces also duplicates chunks.

Trigger

A manual trigger loads the Drive PDF into Pinecone, while a chat trigger starts the OpenAI Q&A agent.

Connected systems

Connected systems

  • Google Drive
  • Pinecone vector store
  • OpenAI
  • Chat interface
  • Self-hosted n8n

Every workflow is deployed on your own server with documentation, a run log and an error queue.

Workflow architecture

Workflow architecture

  1. 1. When clicking 'Test… (Trigger) (connects to Set Google Drive file URL)
  2. 2. Pinecone Vector Store (AI layer)
  3. 3. When chat message received (Trigger) (connects to Question & Answer)
  4. 4. Question & Answer (AI layer)
  5. 5. Set Google Drive file URL (Service and data) (connects to Google Drive)
  6. 6. Google Drive (Service and data) (connects to Pinecone Vector Store)
  7. 7. Default Data Loader (AI layer) (connects to Pinecone Vector Store)
  8. 8. Recursive Character Text… (AI layer) (connects to Default Data Loader)
  9. 9. Embeddings OpenAI1 (AI layer) (connects to Pinecone Vector Store1)
  10. 10. Embeddings OpenAI (AI layer) (connects to Pinecone Vector Store)
  11. 11. Pinecone Vector Store1 (AI layer) (connects to Question & Answer)
  12. 12. OpenAI Chat Model (AI layer) (connects to Question & Answer)
  • Trigger
  • AI layer
  • Logic and routing
  • Service and data

Node positions and directed links are generated from the verified catalogue record.

Workflow steps

Workflow steps

  1. 01

    Drive PDF fetch

    A set node defines the Google Drive file URL and the Google Drive node pulls the binary PDF document.

  2. 02

    Chunking and clean Pinecone upsert

    Text splits into 3,000-character chunks with 200-character overlap and writes into Pinecone with namespace clearing enabled.

  3. 03

    Agent Q&A via Pinecone tool

    Chat questions invoke the Question and Answer agent using gpt-4o-mini and Pinecone in retrieve-as-tool mode.

Error queue and human approval

Error queue and human approval

Built-in state in the catalogue workflow

The verified catalogue workflow contains zero node-level error flags across its 12 functional nodes and 10 connections.

Production layer added by ALTAI

During live deployment, ALTAI adds multi-file metadata tagging, namespace isolation guards, automatic Drive folder triggers and a run error queue.

Frequently asked

Google Drive Pinecone agent RAG Frequently asked questions

Pinecone connects in retrieve-as-tool mode so the agent decides when vector search is needed rather than querying on every greeting.

Clearing the namespace prevents repeated manual test runs from inserting duplicate copies of the exact same PDF chunks.

Yes. Connecting a window buffer or PostgreSQL memory node to the agent takes one step during deployment.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

We write the proposal after we have found the problem together

In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.

30 minutes · no preparation needed

The call and the week of discovery are both free.Read the terms

Chat on WhatsApp