
Self-Host WhatsApp for Your Business with WAHA + n8n (Zero Cost)
How to integrate WhatsApp into your business for free using WAHA and n8n — no third-party services, full data control, powerful automation.
Self-Host WhatsApp for Your Business — Zero Cost
Most WhatsApp Business API solutions charge per message. What if I told you there's a way to connect WhatsApp directly to your business with no third-party services, no per-message fees, and full control over your data?
Meet WAHA (WhatsApp HTTP API) — a self-hosted, open-source solution that pairs beautifully with n8n for workflow automation.
Why Self-Host?
| Feature | Third-Party APIs | WAHA (Self-Hosted) | |---------|-----------------|-------------------| | Cost | $0.05-0.15 per message | Free | | Data Control | Their servers | Your servers | | Customization | Limited | Unlimited | | Vendor Lock-in | Yes | No | | Setup Time | Minutes | ~1 hour |
Architecture Overview
Here's how the pieces fit together:
WhatsApp ←→ WAHA (Docker) ←→ n8n (Automation) ←→ Your Business Logic
- WAHA handles the WhatsApp connection and exposes an HTTP API
- n8n listens for incoming messages and triggers automated workflows
- Your logic processes the data and sends responses back through WAHA
Step 1: Deploy WAHA with Docker
docker run -d \
--name waha \
-p 3000:3000 \
-e WHATSAPP_DEFAULT_ENGINE=WEBJS \
devlikeapro/wahaThat's it. WAHA is now running on port 3000. Open http://localhost:3000 to scan the QR code with your WhatsApp.
Step 2: Set Up n8n
If you don't have n8n running yet:
docker run -d \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
n8nio/n8nOpen http://localhost:5678 and you're in the n8n editor.
Step 3: Create a Webhook Trigger
In WAHA, configure a webhook to send incoming messages to n8n:
curl -X POST http://localhost:3000/api/webhooks \
-H "Content-Type: application/json" \
-d '{
"url": "http://your-server:5678/webhook/whatsapp",
"events": ["message"]
}'In n8n, create a new workflow with a Webhook node as the trigger. Set the path to /whatsapp.
Step 4: Build Your Automation
Here's where it gets powerful. Some real workflows I've built:
Auto-Reply Bot
Webhook → IF (contains "hello") → Send Reply "Hi! How can I help you?"
Order Confirmation
Webhook → Extract Order ID → Query Database → Format Message → Send WhatsApp Reply
Lead Capture
Webhook → Extract Name + Phone → Add to Google Sheets → Send Welcome Message
AI-Powered Conversations
Webhook → Extract Message → Send to LLM API → Send AI Response via WhatsApp
Step 5: Send Messages via API
Sending a message through WAHA is a simple HTTP call:
curl -X POST http://localhost:3000/api/sendText \
-H "Content-Type: application/json" \
-d '{
"chatId": "919929371862@c.us",
"text": "Hello from my self-hosted WhatsApp bot!"
}'In n8n, use an HTTP Request node to call this endpoint.
Real-World Use Case: Restaurant Customer Retention
I built a system for restaurants where:
- Customer places an order
- System generates a personalized image with order details
- WhatsApp message is sent with the image and a "visit again" reminder
- All automated, all self-hosted, zero recurring costs
Security Considerations
- Run WAHA behind a reverse proxy (Nginx) with HTTPS
- Use authentication tokens for the WAHA API
- Keep Docker images updated
- Don't expose ports directly to the internet
Conclusion
Self-hosting WhatsApp for business is not just possible — it's practical. With WAHA and n8n, you get:
- Zero message costs
- Full data ownership
- Unlimited customization
- Powerful automation workflows
The initial setup takes about an hour, and after that, you have a production-ready WhatsApp integration that scales with your business.
Want to build something similar? Connect with me on LinkedIn.


