—
If you’ve been using OpenClaw on your computer and wished you could chat with your AI assistant from anywhere, you’re not alone. WhatsApp is one of the most popular messaging apps in the world, with over 2 billion users. Setting up an **OpenClaw WhatsApp bot** lets you access your personal AI assistant from any device, anywhere.
In this guide, we’ll walk you through the complete process of connecting OpenClaw to WhatsApp. Whether you want to ask questions on the go, automate tasks, or just have a helpful AI in your pocket, this **AI WhatsApp bot setup** will get you there.
## Why WhatsApp is Perfect for AI Agents
Before we dive into the setup, let’s talk about why WhatsApp makes such a great channel for your **WhatsApp AI assistant**:
– **Always Available**: Your phone is always with you, so your AI assistant is too
– **Natural Conversation**: WhatsApp’s chat interface is perfect for back-and-forth conversations
– **Voice Messages**: Send voice notes and get text responses (or vice versa!)
– **Media Sharing**: Send images, documents, and files for your AI to analyze
– **Group Integration**: Add your AI assistant to group chats for collaborative help
– **End-to-End Encryption**: Your conversations stay private
## Prerequisites
Before you start, make sure you have:
1. **OpenClaw installed and running** on your computer or server
2. **A WhatsApp account** (personal or business)
3. **A phone number** that can receive SMS or calls for verification
4. **Node.js 18+** installed on your system
5. **About 30 minutes** of uninterrupted time
If you don’t have OpenClaw set up yet, check out our [beginner’s guide](https://howtoopenclawfordummies.com/product/how-to-open-claw-for-dummies/) first.
## Step 1: Install the WhatsApp Channel Plugin
OpenClaw uses channel plugins to connect to different messaging platforms. The WhatsApp plugin uses the WhatsApp Web API.
Open your terminal and run:
“`bash
npm install @openclaw/channel-whatsapp
“`
This installs the official WhatsApp channel for OpenClaw.
## Step 2: Configure Your OpenClaw Gateway
Open your OpenClaw configuration file (usually `~/.openclaw/config.yaml` or wherever you’ve set it up) and add the WhatsApp channel:
“`yaml
channels:
whatsapp:
enabled: true
sessionPath: ~/.openclaw/whatsapp-session
allowedNumbers:
– “+1234567890” # Your phone number
autoReply: true
“`
The `allowedNumbers` field controls who can message your bot. Start with just your own number for testing.
## Step 3: Link Your WhatsApp Account
Now comes the fun part — linking your WhatsApp account. Run:
“`bash
openclaw gateway start
“`
The first time you start with WhatsApp enabled, you’ll see a QR code in your terminal. Here’s what to do:
1. Open WhatsApp on your phone
2. Go to **Settings → Linked Devices**
3. Tap **Link a Device**
4. Scan the QR code displayed in your terminal
Once scanned, you should see “WhatsApp connected!” in your terminal output.
## Step 4: Test Your Bot
Send a test message to your own WhatsApp number. If everything is set up correctly, you should get a response from your AI assistant within seconds.
Try these test messages:
– “Hello, are you there?”
– “What’s the weather like today?”
– “Remind me to call mom tomorrow at 5pm”
## Step 5: Configure Auto-Start (Optional)
If you want your WhatsApp bot to start automatically when your computer boots, you can set up a system service:
**On macOS (using launchd):**
Create a file at `~/Library/LaunchAgents/com.openclaw.gateway.plist` with your gateway configuration.
**On Linux (using systemd):**
Create a service file at `/etc/systemd/system/openclaw-gateway.service`.
## Configuration Tips for Power Users
### Handling Voice Messages
OpenClaw can transcribe voice messages automatically. Add this to your config:
“`yaml
channels:
whatsapp:
transcribeVoice: true
voiceModel: whisper-large
“`
### Setting Response Delays
To make your bot feel more natural (and avoid rate limits), add a small delay:
“`yaml
channels:
whatsapp:
responseDelayMs: 1500
“`
### Adding Multiple Users
Want your family or team to use the bot too? Add their numbers to the allowlist:
“`yaml
channels:
whatsapp:
allowedNumbers:
– “+1234567890” # You
– “+0987654321” # Partner
– “+1122334455” # Friend
“`
## Common Issues and Troubleshooting
### QR Code Not Appearing
If you don’t see a QR code, try:
– Deleting the session folder: `rm -rf ~/.openclaw/whatsapp-session`
– Restarting the gateway: `openclaw gateway restart`
### “Session Logged Out” Errors
WhatsApp Web sessions can expire. If you see this error:
1. Delete the session folder
2. Restart the gateway
3. Scan a new QR code
### Messages Not Being Delivered
Check that:
– Your internet connection is stable
– The phone running WhatsApp is connected to the internet
– Your number is in the `allowedNumbers` list
### Rate Limiting
If you’re sending too many messages too fast, WhatsApp may temporarily block your bot. Keep response times reasonable and avoid spamming.
## What Can Your WhatsApp Bot Do?
Once set up, your **WhatsApp AI assistant** can:
– **Answer questions** on any topic
– **Set reminders** that ping you at the right time
– **Search the web** and summarize results
– **Analyze images** you send
– **Help with writing** emails, messages, and documents
– **Control smart home devices** (with the right skills installed)
– **Track tasks and todos** throughout your day
## Security Considerations
A few things to keep in mind:
1. **Your bot has access to your AI’s full capabilities** — be careful who you share access with
2. **WhatsApp messages are stored on your device** — consider your privacy needs
3. **Use a dedicated number if possible** for better isolation
4. **Regularly review your session** and unlink devices you don’t recognize
## Ready to Level Up?
Setting up an **OpenClaw WhatsApp bot** is just the beginning. There’s so much more you can do with AI agents — from automating your workflow to building custom skills.
If you want the complete, step-by-step guide to mastering OpenClaw (including advanced WhatsApp features, troubleshooting, and pro tips), grab our ebook:
**[How To OpenClaw For Dummies – Get Your Copy Now](https://howtoopenclawfordummies.com/product/how-to-open-claw-for-dummies/)**
It’s the fastest way to go from beginner to power user. And right now, it’s on sale for just $3.99.
—
*Have questions about setting up your WhatsApp bot? Drop a comment below or message us on Discord!*