Skip to main content

Chat with Google Drive documents using Pinecone and OpenAI RAG

Workflow preview

Workflow preview
100%
Chat with Google Drive documents using Pinecone and OpenAI RAG preview
Open on n8n.io

1. Workflow Overview

Google Drive → Pinecone RAG Chatbot (Auto Sync & Query) This n8n workflow implements a fully automated Retrieval Augmented Generation (RAG) pipeline powered by Google Drive, OpenAI embeddings, and ...

Best for

  • Internal Wiki automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, @n8n/n8n-nodes-langchain.toolvectorstore, n8n-nodes-base.googledrive, n8n-nodes-base.stickynote, n8n-nodes-base.googledrivetrigger, @n8n/n8n-nodes-langchain.memorybufferwindow

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Alberto Idrio.

Original n8n.io source

1.1 Workflow description

Title
Chat with Google Drive documents using Pinecone and OpenAI RAG
Workflow name
Chat with Google Drive documents using Pinecone and OpenAI RAG
Google Drive → Pinecone RAG Chatbot (Auto-Sync & Query)

This n8n workflow implements a fully automated Retrieval-Augmented Generation (RAG) pipeline powered by Google Drive, OpenAI embeddings, and Pinecone.

It continuously keeps a vector database in sync with your company documents and exposes them through an AI chat interface.

What this workflow does

The workflow monitors a Google Drive folder and automatically reacts to document lifecycle events:

  • File created

  • File updated

  • File deleted

When a document is added or updated:

  • The file is downloaded from Google Drive

  • Its content is chunked using a recursive text splitter

  • Embeddings are generated with OpenAI

  • Vectors are stored or updated in Pinecone

When a document is deleted:

The corresponding vectors are removed from Pinecone, keeping the index clean and consistent

On the chat side:

  • A conversational AI agent retrieves relevant vectors from Pinecone

  • Context is injected into the prompt

  • The assistant answers questions grounded only on your documents

Key features

  • End-to-end RAG pipeline (ingestion + retrieval + chat)

  • Automatic vector updates on file changes

  • Idempotent design (safe re-runs, no duplicated vectors)

  • Google Drive as a live knowledge source

  • Pinecone as scalable vector storage

  • OpenAI embeddings and chat models

  • Ready-to-use AI chat interface inside n8n

Typical use cases

  • Internal company knowledge base

  • AI assistant for policies, manuals, and documentation

  • Team chat over shared Google Drive files

  • Lightweight alternative to full-blown document search platforms

  • Prototyping and production RAG systems

Who this template is for

  • n8n users building AI-powered workflows

  • Teams working with Google Drive documents

  • Developers implementing RAG architectures

  • Anyone who wants a self-hosted, controllable, and transparent AI document chatbot

This template is designed to be robust, maintainable, and production-ready, while remaining easy to extend with additional data sources, metadata filtering, or alternative LLM providers.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Pinecone Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 2 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 3 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 4 - Vector Store Tool

Type / Role
@n8n/n8n-nodes-langchain.toolVectorStore - toolVectorStore
Config choices
Version 1

Block 5 - Pinecone Vector Store (Retrieval)

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 6 - Download File From Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 7 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Google Drive File Updated

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 9 - Google Drive File Created

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 10 - Window Buffer Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Search files and folders

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 13 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 14 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 15 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.4

Block 16 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 17 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 18 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 19 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 20 - Send a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 21 - Download File From Google Drive1

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 22 - Pinecone Vector Store1

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 23 - Embeddings OpenAI2

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 24 - Default Data Loader1

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Showing the first 24 of 35 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Chat with Google Drive documents using Pinecone and OpenAI RAG
Complexity advanced
Nodes 35
Categories Internal Wiki, AI RAG
Author Alberto Idrio
Published 01 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13147/13147.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Chat with Google Drive documents using Pinecone and OpenAI RAG do?

Google Drive → Pinecone RAG Chatbot (Auto Sync & Query) This n8n workflow implements a fully automated Retrieval Augmented Generation (RAG) pipeline powered by Google Drive, OpenAI embeddings, and ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.