Skip to main content

RAG-powered document chat with Google Drive, OpenAI, and Pinecone Assistant

Workflow preview

Workflow preview
100%
RAG-powered document chat with Google Drive, OpenAI, and Pinecone Assistant preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Try it out This n8n workflow template lets you chat with your Google Drive documents (.docx, .json, .md, .txt, .pdf) using OpenAI and Pinecone Assistant. It retrieves relevant context from your fil...

Best for

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

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.stickynote, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.chattrigger

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
RAG-powered document chat with Google Drive, OpenAI, and Pinecone Assistant
Workflow name
RAG-powered document chat with Google Drive, OpenAI, and Pinecone Assistant

Try it out

This n8n workflow template lets you chat with your Google Drive documents (.docx, .json, .md, .txt, .pdf) using OpenAI and Pinecone Assistant. It retrieves relevant context from your files in real time so you can get accurate, context-aware answers about your proprietary data—without the need to train your own LLM.

What is Pinecone Assistant?

Pinecone Assistant allows you to build production-grade chat and agent-based applications quickly. It abstracts the complexities of implementing retrieval-augmented (RAG) systems by managing the chunking, embedding, storage, query planning, vector search, model orchestration, reranking for you.

Prerequisites

Setup

  1. Create a Pinecone Assistant in the Pinecone Console here
    1. Name your Assistant n8n-assistant and create it in the United States region
    2. If you use a different name or region, update the related nodes to reflect these changes
    3. No need to configure a Chat model or Assistant instructions
  2. Setup your Google Drive OAuth2 API credential in n8n
    1. In the File added node -> Credential to connect with, select Create new credential
    2. Set the Client ID and Client Secret from the values generated in the prerequisites
    3. Set the OAuth Redirect URL from the n8n credential in the Google Cloud Console (instructions)
    4. Name this credential Google Drive account so that other nodes reference it
  3. Setup Pinecone API key credential in n8n
    1. In the Upload file to assistant node -> PineconeApi section, select Create new credential
    2. Paste in your Pinecone API key in the API Key field
  4. Setup Pinecone MCP Bearer auth credential in n8n
    1. In the Pinecone Assistant node -> Credential for Bearer Auth section, select Create new credential
    2. Set the Bearer Token field to your Pinecone API key used in the previous step
  5. Setup the Open AI credential in n8n
    1. In the OpenAI Chat Model node -> Credential to connect with, select Create new credential
    2. Set the API Key field to your OpenAI API key
  6. Add your files to a Drive folder named n8n-pinecone-demo in the root of your My Drive
    1. If you use a different folder name, you'll need to update the Google Drive triggers to reflect that change
  7. Activate the workflow or test it with a manual execution to ingest the documents
  8. Chat with your docs!

Ideas for customizing this workflow

  • Customize the System Message on the AI Agent node to your use case to indicate what kind of knowledge is stored in Pinecone Assistant
  • Change the top_k value of results returned from Assistant by adding "and should set a top_k of 3" to the System Message to help manage token consumption
  • Configure the Context Window Length in the Conversation Memory node
  • Swap out the Conversation Memory node for one that is more persistent
  • Make the chat node publicly available or create your own chat interface that calls the chat webhook URL.

Need help?

You can find help by asking in the Pinecone Discord community, asking on the Pinecone Forum, or filing an issue on this repo.

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 - Upload file to assistant

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 2 - Download file

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

Block 3 - AI Agent

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

Block 4 - OpenAI Chat Model

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

Block 5 - Delete file from assistant

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Sticky Note1

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

Block 7 - File updated

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

Block 8 - File added

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

Block 9 - Get file to delete

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 10 - Set file data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Sticky Note2

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

Block 12 - Chat input

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

Block 13 - Pinecone Assistant

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

Block 14 - Sticky Note7

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

Block 15 - Check file status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Wait

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

Block 17 - End if status Available

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 18 - Conversation Memory

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

Block 19 - Sticky Note

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

Block 20 - Sticky Note3

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

Block 21 - Sticky Note4

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

Block 22 - Sticky Note5

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

3. Summary Table

Workflow RAG-powered document chat with Google Drive, OpenAI, and Pinecone Assistant
Complexity advanced
Nodes 22
Categories Internal Wiki, AI RAG
Author Pinecone
Published 20 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9942/9942.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 RAG-powered document chat with Google Drive, OpenAI, and Pinecone Assistant do?

Try it out This n8n workflow template lets you chat with your Google Drive documents (.docx, .json, .md, .txt, .pdf) using OpenAI and Pinecone Assistant. It retrieves relevant context from your fil...

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.