Build an AI WhatsApp Customer Service Bot with n8n (No Code, 30 Minutes) A developer built a no-code AI WhatsApp customer service bot using n8n that classifies messages into intents via GPT-4o-mini, handles replies automatically, and escalates urgent issues via Telegram. The workflow costs about $0.46/month for 100 messages per day and can be set up in 30 minutes. Your WhatsApp Business account receives a message at 11pm. It's a potential client asking about your services. By the time you see it tomorrow morning, they've already bought from a competitor. This tutorial shows you how to build a 24/7 AI-powered WhatsApp customer service bot using n8n that: No coding required. Setup time: ~30 minutes. The workflow has 9 nodes and follows a simple decision tree: WhatsApp webhook → Parse message → Classify intent GPT-4o-mini ↓ URGENT? → Yes → Telegram alert + log ↓ No Generate AI reply → Send via WhatsApp API → Log to Sheets → Respond 200 The OpenAI node classifies each message into one of four intents: URGENT — complaints, cancellation threats, problems "the product arrived broken" INFO — general questions "what are your hours?", "do you deliver to Madrid?" BOOKING — appointment requests "I'd like to book for Friday at 5pm" OTHER — anything elseThis is the key logic that decides whether you get woken up or the bot handles it silently. Go to developers.facebook.com https://developers.facebook.com , create an app, add WhatsApp product, and get: my verify token 2026 Set up the webhook to point to your n8n instance: Webhook URL: https://your-n8n.com/webhook/whatsapp-bot Subscribed fields: messages Configure as POST , path: whatsapp-bot . The webhook also needs to handle GET requests for Meta's verification challenge — add a second route or use an IF node to detect the hub.challenge parameter. All settings live in one Code node at the top: js const CONFIG = { // WhatsApp wa phone id: "YOUR PHONE NUMBER ID", wa token: "YOUR WHATSAPP ACCESS TOKEN", // Telegram escalation telegram token: "YOUR BOT TOKEN", telegram chat id: "YOUR CHAT ID", // Google Sheets sheet id: "YOUR SPREADSHEET ID", gcp service account: "vcWuMisYV6Kfx8Vv", // your n8n credential ID // AI context — this is what makes replies feel personalized business name: "Clínica Dental Sánchez", business description: "Clínica dental en Madrid, servicios: limpiezas, ortodoncia, implantes. Horario L-V 9-20h, S 9-14h.", escalation keywords: "urgente", "problema", "queja", "cancelar", "devolver" , openai credential id: "bC16OOi5YkUp5C10", // Fallback if OpenAI fails fallback reply: "Gracias por tu mensaje. Te responderemos lo antes posible en horario laboral." }; return { json: CONFIG } ; The OpenAI node that generates replies uses this prompt structure: You are a customer service assistant for {{business name}}. Business context: {{business description}} Customer message: {{message text}} Message intent: {{classified intent}} Reply professionally in the same language as the customer's message. Keep it under 3 sentences. Don't make up information not in the business context. This is what makes the bot sound like it actually knows your business — not a generic chatbot. The HTTP Request node sends back via the Cloud API: POST https://graph.facebook.com/v19.0/{{wa phone id}}/messages Authorization: Bearer {{wa token}} Content-Type: application/json { "messaging product": "whatsapp", "to": "{{sender phone}}", "type": "text", "text": { "body": "{{ai reply}}" } } This is the most important node that most tutorials miss. WhatsApp requires your webhook to respond with HTTP 200 within 20 seconds. If it doesn't, Meta marks your webhook as unhealthy and stops sending events. Add a Respond to Webhook node at the very end of every branch urgent AND non-urgent that returns {"status": "ok"} with status 200. Total for a small business with 100 messages/day: ~$0.46/month in AI costs. Handles well: Needs human review: The Telegram escalation handles the "needs human review" bucket automatically. Customer sends: "Hola, ¿tenéis cita disponible para limpieza este sábado por la mañana?" Bot replies in ~3 seconds : "¡Hola Sí, tenemos citas disponibles los sábados de 9 a 14h. Para reservar, díganos su nombre y el horario preferido y lo gestionamos enseguida." Customer sends: "El producto que compré llegó roto, exijo una solución AHORA" Bot triggers Telegram alert to you: 🚨 URGENTE | +34612345678 | "El producto que compré llegó roto, exijo una solución AHORA" You reply personally. The customer feels heard. If you want to skip the manual setup, the complete workflow with all nodes pre-configured is available on n8nmarkets.com https://n8nmarkets.com — search "WhatsApp Telegram AI Customer Service Agent". It includes the workflow JSON, README with screenshots, and curl commands to test every node before going live. Built something similar? Share your setup in the comments — especially if you've handled the webhook verification challenge in a clever way.