Build a WhatsApp AI shopping bot with virtual try-on using Gemini and GPT
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (23)
- Redis
n8n-nodes-base.redis - Code
n8n-nodes-base.code - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Mongo Db Tool
n8n-nodes-base.mongoDbTool - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Sheets Tool
n8n-nodes-base.googleSheetsTool - MongoDB Atlas Vector Store
@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - MongoDB
n8n-nodes-base.mongoDb - Edit Image
n8n-nodes-base.editImage - Extract from File
n8n-nodes-base.extractFromFile - HTTP Request
n8n-nodes-base.httpRequest - Google Drive
n8n-nodes-base.googleDrive - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Convert to File
n8n-nodes-base.convertToFile - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch - Merge
n8n-nodes-base.merge - Aggregate
n8n-nodes-base.aggregate - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
What it does
Build a WhatsApp AI shopping bot with virtual try-on using Gemini --- π Overview This workflow fully automates your T-shirt store's WhatsApp shopping experience using GPT for intent detection, MongoDB Atlas for vector-based product search, Redis for session management, and Google Gemini for AI-powered virtual try-on. It automatically handles customer messages, finds relevant products, processes orders, and generates realistic try-on images β all inside WhatsApp, with no app or website required. Customers can search for T-shirts, place orders, and virtually try on items in a single conversation. Redis ensures fast product caching and session tracking. MongoDB Atlas stores the product catalog and orders. Google Sheets logs every order automatically. Gemini generates realistic try-on images from customer selfies. This workflow eliminates manual order handling, improves customer experience, and gives store owners full visibility into orders and product searches. βοΈ How it works This workflow runs automatically when a customer sends a WhatsApp message. π Product search π¬ Receives the customer message via WhatsApp Business API π§ GPT classifies the intent as product search, recommendation, or general query β‘ Checks Redis cache for existing results (TTL: 1 hour) π On a cache miss, runs MongoDB Atlas vector search using OpenAI embeddings ποΈ Sends matching products as interactive WhatsApp cards with Order Now and Virtual Try-On buttons π Order flow π Triggered when the customer taps the Order Now button π¦ AI agent fetches product details from MongoDB ποΈ Creates a new order document in MongoDB π Logs the order to Google Sheets automatically β
Sends an order confirmation message to the customer via WhatsApp π Virtual try-on flow π Triggered when the customer taps the Virtual Try-On button πΎ Stores the product ID in Redis (TTL: 10 minutes) πΈ Prompts the customer to send a clear front-facing selfie π Gemini validates that exactly one real person is in the photo πΌοΈ Merges the product image and selfie and generates a realistic try-on image π© Sends the try-on result back to the customer via WhatsApp ποΈ Clears the Redis context after delivery π Setup steps 1. Import this workflow into n8n 2. Connect your WhatsApp Business Cloud API credentials 3. Connect your OpenAI API credentials (for embeddings and GPT model) 4. Connect your Google Gemini API credentials 5. Connect your MongoDB Atlas credentials and create a vector index named ShopingBot on the product collection 6. Connect your Redis credentials 7. Connect your Google Drive service account credentials 8. Connect your Google Sheets service account credentials 9. Import your product catalog with embeddings into the MongoDB product collection 10. Activate the workflow The workflow will run automatically when customers send WhatsApp messages. π Features π§ AI-powered shopping π€ Automatically classifies customer intent using GPT π Semantic product search using OpenAI embeddings and MongoDB Atlas vector search β‘ Redis caching for ultra-fast repeated search results (TTL: 1 hour) π¬ Interactive WhatsApp product cards with Order Now and Virtual Try-On buttons π Sliding window session memory (last 20 messages per user) π Order management π¦ Fully automated order creation saved to MongoDB π Automatic order logging to Google Sheets π€ AI agent handles the complete order flow without manual input β
Instant order confirmation sent to the customer via WhatsApp π Virtual try-on β¨ AI-powered try-on image generation using Google Gemini π· Selfie validation ensures exactly one real person is in the photo πΌοΈ Product and selfie images resized and merged before generation π© Try-on result delivered directly in the WhatsApp conversation ποΈ Redis TTL automatically clears try-on context after delivery π Security and reliability π‘οΈ Advanced message validation with spam and XSS protection β Unsupported message types rejected with friendly error messages π Retry logic on critical HTTP r