This workflow automates sales inquiries on WhatsApp for any business, replacing manual responses that consume 12+ hours weekly for teams handling 50+ customer messages daily. It uses a retrieval-augmented generation (RAG) AI agent to process text messages, validate inputs, search a customizable product or service catalog, maintain conversation context, and provide personalized recommendations. Non-text or inappropriate messages receive friendly rejection responses. Key nodes include WhatsAppTrigger (WhatsApp Listener) for message intake, Set (Message Processor) for validation and normalization, LangChain Agent (AI Sales Agent) with OpenAI (AI Model/Catalog Query Model), VectorStore (Vector Store), and Embeddings (Embeddings Model) for RAG-based search, MemoryBufferWindow (Conversation Memory) for context, Switch (Smart Responder) for routing valid/invalid messages, and WhatsApp (AI Response Sender/Rejection Sender) for replies. Ideal for small to medium sales teams (3-10 staff) in any industry ($500K-$5M revenue), it reduces response time by 80% for 50-200 inquiries daily.\n\nSaves 10 hours/week on 50+ inquiries, improving response speed by 80%. Suits retail, services, or B2B businesses. Requires WhatsApp Business API (Twilio, $0.005/message), OpenAI API ($0.01-$0.10/1K tokens), n8n ($20/month cloud). Scalable to 500 inquiries/day; needs HTTPS.\n\nSetup Instructions:\n1. Install n8n via cloud.n8n.io or self-host (docker run -it --rm -p 5678:5678 n8nio/n8n).\n2. Set up WhatsApp Business API via Twilio (twilio.com); configure webhook (https://your-n8n.app/webhook/whatsapp-sales-webhook-001) and set WHATSAPP_PHONE_NUMBER_ID.\n3. Obtain OpenAI API key at platform.openai.com; set in devhubconnect-openai-creds.\n4. Load your business’s product/service catalog (e.g., CSV, JSON, PDF) into Vector Store via PRODUCT_CATALOG_PATH.\n5. Set environment variables: OPENAI_API_KEY for AI access, WHATSAPP_PHONE_NUMBER_ID for messaging, PRODUCT_CATALOG_PATH (e.g., 'path/to/your-catalog.json').\n\nTesting:\n- Send WhatsApp message: {messages: [{from: '+1234567890', type: 'text', text: {body: 'What’s your best product?'}]}. Verify AI response with catalog-based recommendation.\n- Test invalid message: {messages: [{from: '+1234567890', type: 'image'}]}. Check rejection response.\n\nErrors:\n- 400 (invalid message, check text format).\n- 429 (API rate limit, adjust maxTokens or add delay).\n- No response (AI missed query, verify catalog data or prompt).\n\nMaintenance:\n- Update catalog in Vector Store with new products/services quarterly.\n- Rotate OpenAI API key every 3 months.\n- Monitor n8n logs for WhatsApp API or RAG failures.\n\nOptimization:\n- Add CATEGORY_KEYWORDS (e.g., 'clothing,electronics') to AI prompt for specific recommendations.\n- Adjust contextWindowLength in Conversation Memory for longer sessions.\n- Fine-tune temperature in AI Model for varied responses.", "businessValue": "Saves 10 hours/week on 50+ inquiries with 80% faster responses", "setupTime": "45-60 minutes", "difficulty": "Intermediate", "requirements": [ "WhatsApp Business API (Twilio, $0.005/message, twilio.com)", "OpenAI API ($0.01-$0.10/1K tokens, platform.openai.com)", "n8n cloud ($20/month) or self-hosted", "Stable HTTPS connection", "Environment variables: OPENAI_API_KEY, WHATSAPP_PHONE_NUMBER_ID, PRODUCT_CATALOG_PATH (e.g., 'path/to/your-catalog.json')" ], "useCase": "Automating WhatsApp-based sales inquiries with RAG-powered recommendations for any business’s product/service catalog"
$5.49
Workflow steps: 13
Integrated apps: whatsAppTrigger, set, agent