After building 50+ automation projects for small businesses, I want to share the architecture I use most often: n8n + WhatsApp + CRM — all self-hosted, no vendor lock-in.
Why n8n?
I've used Make.com, Zapier, and n8n extensively. Here's why n8n wins for serious projects:
- Self-hosted — Your data stays on your server
- No per-execution pricing — Run millions of workflows for $0/month
- Queue Mode — Handle high volumes without dropping messages
- Full control — Custom nodes, JavaScript/Python code, no limits
The Architecture
┌─────────────┐ ┌──────────────┐ ┌──────────┐
│ WhatsApp │────▶│ n8n │────▶│ CRM │
│ (WAHA API) │◀────│ (Queue Mode)│◀────│ (Monday) │
└─────────────┘ └──────────────┘ └──────────┘
│ │ │
│ ┌─────┴──────┐ │
│ │ PostgreSQL │ │
│ │ + Redis │ │
│ └────────────┘ │
│ │
└────────── Google Calendar ◀────────────┘
Key Components
1. WhatsApp Integration
I use WAHA (WhatsApp HTTP API) — a self-hosted solution. Important note: WAHA uses an unofficial WhatsApp connection, not the official Meta Business API. This works great for reactive bots (responding to incoming messages) but is NOT suitable for mass marketing/broadcasting.
// Webhook receives incoming messages
// n8n processes them through workflow
{
"event": "message",
"payload": {
"from": "972501234567@c.us",
"body": "Hello",
"timestamp": 1710000000
}
}
2. n8n Queue Mode
For production, always use Queue Mode. It separates the webhook receiver from the workflow executor:
# docker-compose.yml (simplified)
services:
n8n-main:
image: n8n-custom # Built with queue mode
environment:
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
n8n-worker:
image: n8n-custom
command: worker
environment:
- EXECUTIONS_MODE=queue
redis:
image: redis:7-alpine
postgres:
image: postgres:16
3. Common Workflow Patterns
Lead Response Bot:
- Customer sends message → n8n webhook triggers
- Check if customer exists in CRM
- If new → Create contact + send welcome message
- If existing → Retrieve history + route to relevant flow
- Log everything in CRM
Appointment Scheduling:
- Customer requests appointment
- n8n checks Google Calendar availability
- Present available slots via WhatsApp buttons
- Customer selects → n8n creates calendar event
- Send confirmation + set reminder triggers
Follow-up Sequences:
- Lead enters pipeline → n8n starts sequence
- Day 1: Welcome + relevant info
- Day 3: Value content (article, case study)
- Day 7: Check-in message
- If replied at any point → Exit sequence, notify sales
What I Learned from 50+ Projects
- Always use Queue Mode in production — Regular mode drops webhooks under load
- PostgreSQL > SQLite — SQLite locks under concurrent workflows
- Keep execution history — 7 days minimum for debugging
- Error handling is 80% of the work — APIs fail, messages timeout, edge cases multiply
- Start simple — A basic bot that works > a complex bot that breaks
Results
For a typical small business client:
- 10-15 hours/week saved on manual tasks
- 40-60% fewer appointment no-shows (automated reminders)
- Zero missed leads (24/7 automated response)
- ROI within 1-2 months
Resources
About the Author
I'm Achiya Cohen, founder of Achiya Automation — we build custom WhatsApp bots and business automation systems for small businesses worldwide.
Explore our services:
- WhatsApp Bot for Business — custom-built bots for any industry
- Business Automation Services — end-to-end workflow automation
- Free ROI Calculator — see how much a bot will save your business
- Pricing — transparent, one-time pricing starting at $1,000
- Contact Us — free WhatsApp consultation
Based in Israel? Visit our Hebrew site.
Top comments (0)