WhatsApp Group Bot — Evolution API + n8n Setup Guide
SUPERSEDED — Evolution API replaced by WAHA (NOWEB engine) running on Hostinger vps-h1.
See hostinger/docker-compose.yml and docs/waha.md for current setup.
Stack: Evolution API (self-hosted) · n8n · Docker · Hetzner VPS Cost: Free (open source) + one cheap prepaid SIM Group support: ✅ Full — listen & respond to any WhatsApp group
Prerequisites
Hetzner VPS with Docker + Docker Compose installed
n8n already running (with a public HTTPS URL)
A dedicated phone number (prepaid SIM recommended — not your main number)
# Your public domain for Evolution APISERVER_URL=https://evolution.yourdomain.com# Strong random string — this is your master API keyAUTHENTICATION_API_KEY=your-super-secret-key-here# Enable the Manager UIDEL_INSTANCE=false# Optional: set to true to auto-start instances on restartCLEAN_STORE_CLEANING_INTERVAL=7200# Database (SQLite is fine for small scale)DATABASE_ENABLED=false
Tip for your stack: If you already have a Redis container running, add:
REDIS_ENABLED=trueREDIS_URI=redis://redis:6379
1.3 Start with Docker Compose
docker compose up -d
Check it’s running:
docker compose logs -f# Should show: "HTTP Server running on port 8080"
By default the bot only responds when mentioned (@bot in message text).
To respond to ALL group messages: delete the “Filter: Bot Mentioned?” node and connect “Filter: Has Text” directly to “Claude AI Response”.
To respond only to specific keywords: replace the mention filter with:
{{ $json.text.toLowerCase().includes('help') }}
Step 6 — Activate & Test
In n8n, toggle the workflow to Active
Send a message in the WhatsApp group mentioning @bot
Watch the execution log in n8n
Bot should reply within a few seconds
Workflow Architecture
Webhook Trigger (POST /whatsapp-group)
│
├──▶ Respond 200 OK (immediate ack to Evolution API)
│
└──▶ Filter: Group Messages Only (@g.us check + not from bot itself)
│
└──▶ Extract Message Data (text, groupId, sender, messageId)
│
└──▶ Filter: Has Text
│
└──▶ Filter: Bot Mentioned?
│
└──▶ Claude AI Response
│
└──▶ Extract AI Response
│
└──▶ Send Reply to Group
(quoted reply in group)
Troubleshooting
Bot not receiving messages
# Check Evolution API is runningdocker compose ps# Check webhook is registeredcurl https://evolution.yourdomain.com/webhook/find/groupbot \ -H "apikey: your-super-secret-key-here"# Check n8n webhook is active (not just test mode)# In n8n: workflow must be ACTIVE, not just in test/listen mode
Session disconnected
WhatsApp occasionally logs out the session. To reconnect:
# Via APIcurl -X DELETE https://evolution.yourdomain.com/instance/logout/groupbot \ -H "apikey: your-key"# Then rescan QR in Manager UI
Messages arriving but no reply
Check n8n execution log for errors:
401 on Claude call → wrong API key
404 on Evolution send → wrong instance name or domain
Empty text field → message type not supported (e.g. sticker, poll)
Rate limiting / flooding
Add a Wait node (1-2 seconds) before the send node to avoid triggering WhatsApp spam detection.
Docker Compose Integration
If you want Evolution API in your existing docker-compose.yml:
The bot number should be dedicated — not your personal WhatsApp
Evolution API uses WhatsApp Web protocol (unofficial) — use a spare number to avoid bans
Avoid sending too many messages too fast (add delays for bulk operations)
Useful Evolution API Endpoints
# List all instancesGET /instance/fetchInstances# Check connection statusGET /instance/connectionState/groupbot# Get all groups the number is inGET /group/fetchAllGroups/groupbot?getParticipants=false# Send a message manuallyPOST /message/sendText/groupbotBody: { "number": "GROUP_ID@g.us", "text": "Hello group!" }
Generated: May 2026 | Evolution API v2.x | n8n v1.x