Handle WhatsApp orders, FAQs, and tracking with GPT-4o, Pinecone, and Sheets
Quick overview This workflow builds a WhatsApp business assistant that uses OpenAI to classify incoming messages and route them to FAQ answers via Pinecone RAG, order placement and inventory updates in Google Sheets, order-status lookups, or Slack escalation for human support, with a Google Drive-to-Pinecone knowledge sync.
How it works Triggers when a new WhatsApp message is received and extracts the sender phone number, message text, and a timestamp. Uses OpenAI (GPT-4o) to classify the message intent as FAQ, ORDER, TRACK_ORDER, or HUMAN_SUPPORT and routes the request accordingly. For FAQ requests, retrieves relevant context from a Pinecone vector index and uses OpenAI to draft a short WhatsApp-style answer, then replies via WhatsApp. For ORDER requests, uses OpenAI to extract product and quantity, matches the request semantically against a Google Sheets product catalog, and validates the matched product. If the product is found and stock is sufficient, appends a new order row to a Google Sheets Orders sheet, updates stock in the Products sheet, and sends an order confirmation via WhatsApp. If the product is not found or stock is insufficient, sends an error/out-of-stock message via WhatsApp. For TRACK_ORDER requests, uses OpenAI to extract the order ID, looks up the order in Google Sheets, and replies with the current status via WhatsApp. For HUMAN_SUPPORT requests, posts the customer message details to a Slack channel and sends an acknowledgement back to the customer on WhatsApp.
Setup Configure WhatsApp Cloud API credentials in n8n and ensure your WhatsApp app is set to send message webhooks to the workflow trigger URL. Add OpenAI API credentials for intent classification, order extraction, semantic matching, order ID extraction, and FAQ response generation. Set up Google Sheets OAuth credentials and update the spreadsheet/document ID and sheet tabs for Products and Orders to match your own schema (including product_id, product_name, stock, and order_id fields). Create a Pinecone index (and namespace) compatible with OpenAI embeddings and add Pinecone API credentials, then populate it with your knowledge base content. Add Google Drive OAuth credentials and select the knowledge base file to watch so updates are downloaded, chunked, embedded, and stored in Pinecone. Add Slack API credentials and choose the target channel ID where human support requests should be posted.
Additional info Use Case Examples
- Ecommerce WhatsApp Store
Customers can: Ask product questions Place orders Track deliveries
- Retail Product Inquiry Bot
Customers can: Check stock Ask pricing Get product information
- AI Customer Support Assistant
Businesses can automate: FAQs Support requests Escalations
- WhatsApp Order Management System
Businesses can: Receive orders Update inventory Manage fulfillment
- AI-Powered Knowledge Assistant
Businesses can provide: Policy answers Business information Service details
You can use and customize this workflow for many more use cases depending on business requirements.
Need Help?
If you need help with:
Workflow setup Customization API integration AI prompt engineering Pinecone setup WhatsApp Cloud API Custom business automation Marketplace-ready workflow development Advanced AI agent workflows
You can contact n8n workflow developers at WeblineIndia for professional assistance.
WeblineIndia can help you:
Customize this workflow for your business Add advanced AI features Integrate ERP/CRM systems Build enterprise-grade automations Create scalable AI business assistants Develop custom n8n workflows
Related Templates
Sync payment and customer data between Stripe and Pipedrive
This workflow combines customers' details with their payment data and passes the input to Pipedrive as a note to the org...
Bulk Create Shopify Products with Inventory Management from Google Sheets
Create Products in Shopify from a Google Sheet This workflow creates products in your Shopify store from a google sheet...
🎓 Learn Data Synchronization: Warehouse Inventory Audit Tutorial
How it works This template is a hands-on tutorial for one of n8n's most powerful data tools: the Compare Datasets node....
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments