Skip to main content

Customer support chatbot with RAG using OpenAI and Pinecone

Workflow preview

Workflow preview
100%
Customer support chatbot with RAG using OpenAI and Pinecone preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Simple RAG Customer Support Chatbot Overview This intelligent customer support chatbot leverages Retrieval Augmented Generation (RAG) to provide accurate, contextual responses by combining yo...

Best for

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

Tools used

n8n-nodes-base.googledrivetrigger, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Customer support chatbot with RAG using OpenAI and Pinecone
Workflow name
Customer support chatbot with RAG using OpenAI and Pinecone

πŸ€– Simple RAG Customer Support Chatbot

πŸ“‹ Overview

This intelligent customer support chatbot leverages Retrieval-Augmented Generation (RAG) to provide accurate, contextual responses by combining your knowledge base with AI capabilities. The system automatically retrieves relevant documents from your Pinecone vector store and uses them to generate informed responses through OpenAI's language models.

⚑ Quick Setup

  1. Import Workflow Import this workflow template into your n8n instance
  2. Configure Credentials Add the following API credentials:
  • OpenAI API Key: For chat completions and embeddings
  • Pinecone API Key: For vector database operations
  • Google Drive: For document auto ingestion
  1. Initialize Vector Store Use the "Insert documents into Pinecone" workflow to populate your knowledge base
  2. Activate Workflow Enable the main chat workflow to start receiving requests

πŸ”§ How it Works

Main Chat Flow (Agent Workflow)

User Message β†’ Memory Retrieval β†’ Vector Search β†’ Context Assembly β†’ AI Response β†’ Memory Update β†’ Response

Process Flow:

Message Reception: Webhook receives user chat messages with session management Memory Retrieval: Loads conversation history for context continuity Semantic Search: Queries Pinecone vector store for relevant documents Context Assembly: Combines retrieved documents with conversation history AI Generation: OpenAI generates contextual response using assembled context Memory Storage: Updates conversation memory for future interactions Response Delivery: Returns formatted response to user interface

Document Ingestion Flow

Document Source β†’ Text Extraction β†’ Chunking β†’ Embedding β†’ Vector Storage

Process Flow:

Document Trigger: Google Drive or manual file upload detection Content Extraction: Extracts text from various file formats (PDF, DOC, TXT) Text Chunking: Splits documents into optimal chunks for embedding Embedding Generation: Creates vector embeddings using OpenAI Vector Storage: Stores embeddings in Pinecone with metadata Index Update: Updates search index for immediate availability

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 - Google Drive Trigger

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

Block 2 - Download file

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

Block 3 - Pinecone Vector Store

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

Block 4 - Embeddings OpenAI

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

Block 5 - Default Data Loader

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

Block 6 - Recursive Character Text Splitter

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

Block 7 - AI Agent

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

Block 8 - OpenAI Chat Model

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

Block 9 - Simple Memory

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

Block 10 - Embeddings OpenAI1

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

Block 11 - Sticky Note

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

Block 12 - Sticky Note1

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

Block 13 - When chat message received

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

Block 14 - Reranker Cohere

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

Block 15 - Vector Store

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

3. Summary Table

Workflow Customer support chatbot with RAG using OpenAI and Pinecone
Complexity advanced
Nodes 15
Categories AI RAG, Multimodal AI
Author Ilyass Kanissi
Published 19 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7561/7561.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 Customer support chatbot with RAG using OpenAI and Pinecone do?

Simple RAG Customer Support Chatbot Overview This intelligent customer support chatbot leverages Retrieval Augmented Generation (RAG) to provide accurate, contextual responses by combining yo...

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.