WhatsApp Integration
Connect OpenClaw to WhatsApp for Seamless AI Assistance
Turn WhatsApp into your AI-powered command center. Send natural language commands, automate workflows, manage your calendar, control smart devices, and get instant AI assistance - all from the messaging app you already use every day. With over 2 billion users worldwide, WhatsApp becomes the perfect interface for your personal AI assistant.
Setup Guide
Prerequisites and Requirements
Before setting up the WhatsApp integration, ensure you have OpenClaw installed and running on your server or local machine. You'll need a WhatsApp account (personal or business), Node.js 18+ installed, and administrative access to your OpenClaw configuration. For production deployments, a WhatsApp Business API account is recommended for better reliability and compliance.
# Verify OpenClaw is running
curl http://localhost:3000/health
# Check Node.js version
node --version # Should be 18.x or higher
# Verify npm is available
npm --version Install the WhatsApp Bridge Module
OpenClaw uses bridge modules to connect with WhatsApp. The most popular options are the official WhatsApp Business API integration or community bridges like Baileys. For personal use, Baileys provides a free, open-source solution. For business applications, the official API offers better support and compliance.
# Navigate to OpenClaw directory
cd /path/to/openclaw
# Install WhatsApp bridge using OpenClaw CLI
openclaw install whatsapp-bridge
# Or install manually
npm install @openclaw/whatsapp-bridge
# For Baileys-based connection (personal use)
npm install @whiskeysockets/baileys Configure WhatsApp Connection Settings
Create or modify your OpenClaw configuration file to include WhatsApp bridge settings. Specify your preferred connection method, authentication settings, and message handling preferences. The configuration supports multiple WhatsApp accounts if needed.
# config/whatsapp.yaml
whatsapp:
enabled: true
bridge: baileys # or 'business-api'
# Authentication
auth:
store_path: ./data/whatsapp-auth
multi_device: true
# Message handling
messages:
auto_read: true
typing_indicator: true
trigger_prefix: "!ai" # Optional command prefix
# Rate limiting
rate_limit:
messages_per_minute: 30
cooldown_seconds: 2
# Allowed contacts (leave empty for all)
allowed_contacts: []
# Group settings
groups:
enabled: true
require_mention: true # Require @AI mention in groups Authenticate with WhatsApp
Run the authentication flow to link your WhatsApp account with OpenClaw. For the Baileys bridge, this involves scanning a QR code with your WhatsApp mobile app. The session credentials are stored locally and persist across restarts.
# Start the WhatsApp authentication process
openclaw whatsapp auth
# This will display a QR code in your terminal
# Open WhatsApp on your phone:
# 1. Go to Settings > Linked Devices
# 2. Tap 'Link a Device'
# 3. Scan the QR code displayed in terminal
# Verify connection status
openclaw whatsapp status
# Expected output:
# WhatsApp Bridge Status: Connected
# Account: +1234567890
# Device: OpenClaw Server Configure AI Response Behavior
Customize how OpenClaw responds to WhatsApp messages. Set up personality traits, response formats, language preferences, and special handling rules. You can create different response profiles for different contacts or groups.
# config/whatsapp-ai.yaml
ai_responses:
# Default personality
personality: helpful_assistant
# Response formatting
format:
max_length: 4000 # WhatsApp message limit
use_markdown: false # WhatsApp doesn't support markdown
split_long_messages: true
# Language settings
language:
auto_detect: true
default: en
supported: [en, es, fr, de, pt, zh, ja, ko]
# Context handling
context:
message_history: 50 # Messages to remember
session_timeout: 3600 # Seconds
# Special handlers
handlers:
voice_notes: transcribe_and_respond
images: analyze_and_describe
documents: extract_and_summarize
locations: provide_contextual_info Set Up Automation Triggers
Create automation rules that trigger based on WhatsApp messages. Set up scheduled messages, auto-responses for specific keywords, and integration triggers that connect WhatsApp to other services through OpenClaw's MCP protocol.
# config/whatsapp-automations.yaml
automations:
# Morning briefing
- name: daily_briefing
trigger:
type: scheduled
cron: "0 7 * * *" # 7 AM daily
action:
send_message:
content: "Good morning! Here's your briefing..."
include:
- weather
- calendar_today
- top_news
- reminders
# Keyword triggers
- name: quick_weather
trigger:
type: keyword
patterns: ["weather", "forecast", "rain?"]
action:
fetch_weather:
location: auto # Use user's last known location
# Smart home integration
- name: home_control
trigger:
type: intent
intents: ["turn_on", "turn_off", "set_temperature"]
action:
forward_to: home_assistant Test Your Integration
Verify that the WhatsApp integration is working correctly by sending test messages and checking responses. Test various features including text responses, voice note handling, image analysis, and automation triggers.
# Send a test message from your phone to the connected number
# Or use the CLI to verify:
openclaw whatsapp test
# Run integration tests
openclaw test whatsapp --verbose
# Check logs for any issues
openclaw logs whatsapp --tail 100
# Monitor real-time message handling
openclaw whatsapp monitor Production Deployment Considerations
For reliable production use, consider implementing proper error handling, session recovery, message queuing, and monitoring. Use process managers like PM2 or systemd to keep the bridge running, and implement health checks for automatic recovery.
# PM2 ecosystem file for production
# ecosystem.config.js
module.exports = {
apps: [{
name: 'openclaw-whatsapp',
script: 'openclaw',
args: 'whatsapp start',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
WHATSAPP_LOG_LEVEL: 'info'
},
error_file: './logs/whatsapp-error.log',
out_file: './logs/whatsapp-out.log'
}]
};
# Start with PM2
pm2 start ecosystem.config.js What You Can Do
Personal Task Management
Transform WhatsApp into your personal productivity hub. Send quick messages like 'remind me to call mom at 5pm' or 'add milk to my shopping list' and OpenClaw handles the rest. Review your tasks, get daily summaries, and manage your to-do lists through natural conversation without ever opening another app.
Smart Home Control
Control your entire smart home through WhatsApp messages. 'Turn off all lights', 'Set thermostat to 72', 'Lock the front door', or 'Show me the front porch camera' - all processed instantly by OpenClaw. Create scenes, check device status, and automate routines through simple text commands.
Calendar and Scheduling
Manage your entire schedule through WhatsApp. Ask 'What's on my calendar today?', 'Schedule a meeting with John tomorrow at 2pm', or 'Find a free slot next week for a dentist appointment'. OpenClaw integrates with Google Calendar, Outlook, and Apple Calendar to keep your life organized.
Information and Research
Get instant answers to any question. Whether you need quick facts, detailed research, translations, calculations, or real-time information like weather and news, simply ask through WhatsApp. OpenClaw searches the web, processes information, and delivers concise, relevant answers.
Family Coordination
Add OpenClaw to your family WhatsApp group for shared assistance. Coordinate schedules, share shopping lists, plan meals, track family events, and get help with homework questions. Everyone can interact with the AI assistant, making family organization effortless.
Travel Assistant
Plan trips, get real-time flight updates, find local recommendations, translate languages, convert currencies, and navigate new cities - all through WhatsApp. Share your location and get contextual suggestions for restaurants, attractions, and transportation options.
Health and Fitness Tracking
Log meals, track workouts, record symptoms, and monitor health metrics through simple WhatsApp messages. 'I just ran 5k in 28 minutes', 'Log breakfast: oatmeal with berries', or 'How many calories have I eaten today?' OpenClaw maintains your health diary effortlessly.
Customer Support Automation
For businesses, deploy OpenClaw on WhatsApp Business to handle customer inquiries automatically. Answer FAQs, process orders, schedule appointments, and escalate complex issues to human agents. Provide 24/7 support without expanding your team.
Voice Note Processing
Send voice notes when typing isn't convenient. OpenClaw transcribes your voice messages, understands the intent, and responds appropriately. Perfect for hands-free operation while driving, cooking, or multitasking. Get text responses or voice replies based on your preference.
Known Limitations
- WhatsApp Business API requires approval and has associated costs for high-volume messaging
- Community bridges like Baileys operate in a legal gray area and may violate WhatsApp's Terms of Service
- Message rate limits apply: sending too many messages too quickly may result in temporary or permanent bans
- End-to-end encryption means OpenClaw cannot access messages from before the integration was set up
- Group message handling requires mentions or trigger words to avoid responding to every message
- Voice note transcription accuracy depends on audio quality and background noise
- Image analysis capabilities are limited compared to dedicated vision APIs
- WhatsApp may update their protocols, potentially breaking community bridge connections
- Multi-device support requires re-authentication if the primary phone is disconnected for extended periods
- Business accounts cannot send messages to users who haven't initiated contact first (anti-spam policy)
- Our team can help you work around these limitations with custom configurations
Related Content
Bring OpenClaw AI Power to Your Discord Server
Deploy OpenClaw as a Discord bot for your server. Automate moderation, answer questions, manage communities, run games, and provide AI assistance to all your members with slash commands and rich embeds.
Supercharge Your Gmail with OpenClaw AI
Connect OpenClaw to Gmail for intelligent email management. Automatically summarize messages, draft responses, organize your inbox, and manage emails through natural language commands.
Connect OpenClaw to LINE Messenger
Deploy OpenClaw on LINE messenger to reach 200 million users across Japan, Taiwan, Thailand, and Indonesia. Build powerful AI chatbots with rich messaging, LIFF apps, and LINE ecosystem integration.
OpenClaw on Matrix: Decentralized AI for a Decentralized World
Deploy OpenClaw on the Matrix protocol for a truly decentralized AI assistant. Self-host everything, federate with others, and maintain complete sovereignty over your AI interactions.