ClawdBot WhatsApp Integration

Turn WhatsApp into your AI assistant interface. QR code pairing, group chat support, and full automation.

💬 WhatsApp Integration Overview

ClawdBot connects to WhatsApp using the Baileys library, which implements the WhatsApp Web protocol.

What You Can Do

  • ✅ Chat with AI through WhatsApp
  • ✅ Use in personal chats and groups
  • ✅ Send/receive images and files
  • ✅ Voice message support
  • ✅ Group moderation features
  • ✅ Automated responses

Requirements

  • WhatsApp account (phone number)
  • ClawdBot installed and running
  • Smartphone with WhatsApp app
  • QR code scanner (WhatsApp app)

🔧 Setup & Pairing

Step 1: Enable WhatsApp Channel

# In config.yaml
channels:
  whatsapp:
    enabled: true
    sessionName: "clawdbot-wa"
    autoReconnect: true

Step 2: Start ClawdBot

clawdbot start

Step 3: Scan QR Code

A QR code will appear in your terminal. Scan it with WhatsApp:

  1. Open WhatsApp on your phone
  2. Tap Menu (⋮) → Linked Devices
  3. Tap "Link a Device"
  4. Scan the QR code from terminal

Step 4: Verify Connection

Send yourself a message: "Hello ClawdBot!"

✨ Features

Text Messages

You: What's the weather today?
Bot: [Fetches weather data]

You: Write a Python function to sort a list
Bot: [Generates code]

Image Analysis

You: [Sends photo]
You: What's in this image?
Bot: I see a sunset over mountains...

File Operations

You: [Sends PDF]
You: Summarize this document
Bot: [Reads and summarizes PDF]

Voice Messages

You: [Sends voice message]
Bot: [Transcribes and responds]

📱 Usage Examples

Personal Assistant

You: Remind me to call mom at 3pm
Bot: Reminder set for 3:00 PM today

You: What's on my calendar tomorrow?
Bot: [Lists calendar events]

Research Helper

You: Research the latest AI developments
Bot: [Browses web, compiles information]

You: Find flights to Tokyo next week
Bot: [Searches and presents options]

Coding Assistant

You: Debug this error: [paste error]
Bot: [Analyzes and suggests fixes]

You: Create a React component for a login form
Bot: [Generates complete code]

👥 Group Chat Features

Enable in Groups

# In config.yaml
channels:
  whatsapp:
    groups:
      enabled: true
      mentionOnly: true  # Only respond when mentioned

Group Commands

@ClawdBot help
@ClawdBot summarize last 50 messages
@ClawdBot translate to Spanish: Hello everyone!

Moderation

@ClawdBot ban @user
@ClawdBot mute @user 1h
@ClawdBot set rules: No spam, be respectful

🔧 Troubleshooting

QR Code Not Appearing

# Check logs
clawdbot logs

# Restart WhatsApp channel
clawdbot channel restart whatsapp

Connection Lost

# Delete session and re-pair
rm -rf ~/.clawdbot/whatsapp-session
clawdbot start

Messages Not Sending

# Check WhatsApp status
clawdbot status

# Verify phone has internet connection

❓ FAQ

Is this the official WhatsApp API?
No, ClawdBot uses WhatsApp Web protocol (Baileys library). It works like WhatsApp Web on your browser.
Can my account get banned?
Unlikely if used reasonably. Avoid spam, excessive automation, or violating WhatsApp ToS.
Does my phone need to be online?
Initially yes for pairing. After that, ClawdBot works independently.
Can I use multiple WhatsApp accounts?
Yes, configure multiple sessions with different names in config.yaml.

📚 Related Guides