🦀 ClawHub
whatsapp-monitor
by @mrhanson
Monitor specified WhatsApp chats for keywords in real time and batch export matched messages to Feishu multi-dimensional tables with optional alerts.
⚙️ Configuration
WhatsApp Targets
Create config/whatsapp-targets.json:
{
"version": "1.0",
"targets": [
{
"name": "Project Team Chat",
"type": "group", // "contact" or "group"
"identifier": "1234567890-1234567890@g.us", // WhatsApp group ID
"enabled": true,
"keywords": ["urgent", "deadline", "blocker", "issue"],
"priority": "high"
},
{
"name": "Client Support",
"type": "contact",
"identifier": "+1234567890@c.us", // WhatsApp contact ID
"enabled": true,
"keywords": ["complaint", "escalation", "critical", "outage"],
"priority": "medium"
}
],
"monitoring": {
"scan_interval_minutes": 5,
"batch_size": 10,
"max_age_hours": 24,
"alert_on_high_priority": true
}
}
Feishu Settings
Create config/feishu-settings.json:
{
"feishu": {
"app_id": "YOUR_APP_ID",
"app_secret": "YOUR_APP_SECRET",
"table_app_token": "YOUR_TABLE_APP_TOKEN",
"table_token": "YOUR_TABLE_TOKEN"
},
"table": {
"name": "WhatsApp Monitor Log",
"fields": [
{"name": "timestamp", "type": "datetime"},
{"name": "source", "type": "text"},
{"name": "sender", "type": "text"},
{"name": "message", "type": "text"},
{"name": "keyword_matched", "type": "text"},
{"name": "priority", "type": "text"}
]
},
"export": {
"batch_threshold": 10,
"schedule": "every 30 minutes",
"retry_on_failure": true,
"max_retries": 3
}
}
📋 Tips & Best Practices
Common Issues
1. WhatsApp Web Connection - Ensure browser automation is working 2. Feishu API Permissions - Verify app has correct table permissions 3. Keyword Matching - Check for case sensitivity and special characters
Monitoring Status
Check monitoring logs in logs/whatsapp-monitor.log for operational details and errors.
TERMINAL
clawhub install whatsapp-monitor