Build a sophisticated RAG-powered WhatsApp bot with this n8n workflow. Automatically synchronize knowledge from Google Drive into Pinecone and respond instantly using GPT-4o-mini.
Download this n8n workflow template and start using it instantly.
Small to Medium Businesses (SMBs): Who need an instant, 24/7 customer service or sales assistant without building a custom API.
Technical Developers: Seeking ready-made n8n templates for advanced RAG implementations.
Sales Teams: Wanting an automated assistant that can provide accurate, up-to-date product information based on internal documents.
n8n Users: Looking to integrate LangChain nodes and custom webhooks for real-time messaging automation.
This comprehensive n8n workflow solves the problem of keeping an AI agent's knowledge accurate and accessible in real-time, specifically within a high-volume messaging platform like WhatsApp. The automation is split into two critical parts: Knowledge Indexing and Live Chat Automation.
The first part uses an n8n trigger (Google Drive) to constantly monitor and update the Pinecone vector database when source documents change, ensuring the AI always has the latest information. The second part is a responsive WhatsApp chatbot built around an advanced RAG model (Retrieval-Augmented Generation). The custom configuration of the Agent n8n node ensures that the AI maintains a professional, goal-oriented sales persona, making this a highly effective business solution. This structure makes it one of the most powerful n8n templates available for real-time customer engagement.
The n8n workflow operates in two distinct, interconnected pipelines:
To deploy this powerful n8n workflow, follow these steps:
3vansales in this template) is selected. Every minute check if file is updated (Google Drive Trigger n8n trigger):
Function: The primary n8n trigger for the indexing pipeline. It continuously monitors a specific document ID in Google Drive for changes.
Key Configuration: triggerOn: 'specificFile'; pollTimes: 'everyMinute'. This ensures the RAG knowledge base is always fresh.
Index Pinecone Vector Store (n8n node):
Function: Handles data persistence, inserting embedded document chunks into the Pinecone index (3vansales).
Key Configuration: mode: 'insert'; options.clearNamespace: true (This flushes the old data before inserting new, crucial for consistency).
Listen to Whatsapp webhook (Webhook n8n trigger):
Function: The entry point for live interactions. It listens for POST requests containing incoming WhatsApp message data.
Key Configuration: responseMode: 'responseNode'; requires a specific custom webhook path.
Get top chunks matching query (Pinecone Vector Store n8n node):
Function: Performs the vector similarity search, retrieving the most relevant context chunks for the user's query.
Key Configuration: mode: 'load'; topK: 4; prompt: The embedded user message.
Question & Answer (LangChain Agent n8n node):
Function: The core decision-making and generation engine. It combines context, memory, and the LLM to generate the final response.
Key Configuration: Contains a highly detailed systemMessage defining the AI agent's identity, tone (friendly, professional sales agent for GrayBox), key behaviors (e.g., pricing starts at 3 million IDR/m²), and conversion links. It explicitly uses the context variable prepared by upstream n8n nodes.
Simple Memory (LangChain Memory n8n node):
Function: Stores conversation history to maintain conversational context.
Key Configuration: sessionKey: ={{ $json.fromNumber }}. Uses the sender's phone number to uniquely identify and track each user's conversation thread.
Create a powerful AI receptionist using this n8n workflow. Automate appointment booking, calendar checks, and customer data logging via OpenAI, Google Calendar, and Google Sheets.

Deploy an AI Telegram support bot using this powerful n8n workflow. Automate lead capture, manage conversation history, and use n8n node tools for FAQ and service lookups.

Deploy a powerful n8n workflow to manage Discord channels. This AI agent uses GPT-4o-mini and specific n8n node tools to handle multi-channel communication, content posting, and conversation memory.

Deploy an automated SMS support chatbot using GPT-4o, n8n, and GoHighLevel. This n8n workflow scrapes your website content to create a RAG knowledge base for instant, accurate customer replies.

Automate social media management using this comprehensive n8n workflow. Generate content, images (via OpenAI), manage multi-stage approvals (Gmail), and publish to Instagram via the Facebook Graph API. Download this n8n template today.









































