Skip to main content

Chat with Google Drive documents using GPT, Pinecone, and RAG

Workflow preview

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

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Automatically sync files from Google Drive into a searchable AI knowledge base with Pinecone, and answer user queries using GPT 4o with conversational memory. ⸻ ️ Workflow Usage Steps 1. Watch Go...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolvectorstore, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Chat with Google Drive documents using GPT, Pinecone, and RAG
Workflow name
Chat with Google Drive documents using GPT, Pinecone, and RAG

📌 Short Overview

Automatically sync files from Google Drive into a searchable AI knowledge base with Pinecone, and answer user queries using GPT-4o with conversational memory.

🛠️ Workflow Usage Steps

1. Watch Google Drive for file changes

Trigger the workflow when a new file is uploaded or an existing file is updated in a specific Google Drive folder.

2. Download and process the file

Retrieve the file, split it into smaller text chunks with a Recursive Character Text Splitter, and generate vector embeddings using OpenAI.

3. Store embeddings in Pinecone

Save the embeddings in a Pinecone vector database to keep your knowledge base continuously updated and searchable.

4. Search context for chat queries

When a user asks a question, query Pinecone for relevant context, combine results with conversational memory, and process them with GPT-4o.

5. Respond with AI-powered answers

Provide a concise response (100–200 words) that blends knowledge from your documents with the conversation history.

✅ Use Cases

• Keep a live, AI-ready knowledge base from your Google Drive files. • Enable team members to query company documents instantly. • Build a personal assistant that stays up to date with your latest uploads.

⚙️ Setup Steps

  1. Google Drive • Create a Google Cloud project. • Enable the Google Drive API. • Generate OAuth credentials and connect them in n8n.
  2. OpenAI • Sign up at OpenAI. • Copy your API key from the dashboard. • Add it to n8n under Credentials → OpenAI API.
  3. Pinecone • Create an account at Pinecone. • Create a new index (e.g., docs-embeddings). • Copy your API key and environment, then add them to n8n under Credentials → Pinecone API.
  4. Workflow Configuration • Import this workflow into your n8n instance. • Select the Google Drive folder you want to monitor. • Set the Pinecone index name in the workflow. • Adjust chunk size / overlap in the text splitter if needed.
  5. Test the Workflow • Upload a new document to your Google Drive folder. • Run the workflow to confirm embeddings are created and stored in Pinecone. • Ask a sample query and verify the AI returns a context-aware answer.

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 - OpenAI Chat Model

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

Block 2 - Window Buffer Memory

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

Block 3 - Vector Store Tool

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

Block 4 - Generate Embeddings for Search with OpenAI

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

Block 5 - OpenAI Chat Model1

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

Block 6 - Embeddings OpenAI1

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

Block 7 - Default Data Loader

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

Block 8 - Recursive Character Text Splitter

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

Block 9 - Sticky Note1

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

Block 10 - Sticky Note5

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

Block 11 - AI Sales Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.6

Block 12 - Download File From Google Drive

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

Block 13 - Google Drive File Updated

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

Block 14 - Google Drive File Created

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

Block 15 - Sticky Note3

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

Block 16 - Sticky Note

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

Block 17 - When chat message received

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

Block 18 - Pinecone Vector Store

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

Block 19 - Pinecone Vector Store (Retrieval)

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

Block 20 - Download File From Google Drive1

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

3. Summary Table

Workflow Chat with Google Drive documents using GPT, Pinecone, and RAG
Complexity advanced
Nodes 20
Categories AI RAG, Multimodal AI
Author Marko
Published 28 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7979/7979.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 GPT, Pinecone, and RAG do?

Automatically sync files from Google Drive into a searchable AI knowledge base with Pinecone, and answer user queries using GPT 4o with conversational memory. ⸻ ️ Workflow Usage Steps 1. Watch Go...

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 AI RAG, Multimodal AI use case.