A quick guide to setting up OpenClaw in WhatsApp group chats.
- Shared context: Multiple people can interact with your assistant in one place
- Family/team assistant: Great for household tasks, shared reminders, trip planning
- Less context switching: No need to DM the bot separately
- OpenClaw gateway running with WhatsApp connected
- Your WhatsApp number linked via
openclaw channels login - The bot added to a WhatsApp group
WhatsApp groups are identified by a JID (Jabber ID) that looks like: 123456789012345678@g.us
To find it:
- Send a message in the group (with or without @mentioning the bot)
- Check active sessions:
openclaw sessions list
- Look for a session with
whatsapp:group:in the key — the JID is the part aftergroup:
Alternative: If you have access to the agent, ask it to run:
sessions_list with messageLimit: 1
And look for group sessions in the output.
Add the group JID to your ~/.openclaw/openclaw.json:
{
"channels": {
"whatsapp": {
"groupPolicy": "allowlist",
"groups": {
"123456789012345678@g.us": {}
}
}
}
}Each group can have these settings:
{
"groups": {
"123456789012345678@g.us": {
"requireMention": true
}
}
}| Option | Default | Description |
|---|---|---|
requireMention |
true |
If true, bot only responds when @mentioned. Set to false to respond to all messages. |
After editing config, restart for changes to take effect:
openclaw gateway restartOr if using the config tool:
openclaw config set channels.whatsapp.groups.'123456789012345678@g.us'.requireMention false{
"channels": {
"whatsapp": {
"groupPolicy": "allowlist",
"groups": {
"123456789012345678@g.us": {}
}
}
}
}Bot responds only when @mentioned in the group.
{
"channels": {
"whatsapp": {
"groupPolicy": "allowlist",
"groups": {
"123456789012345678@g.us": {
"requireMention": false
}
}
}
}
}Bot responds to ALL messages in the group (use with caution in busy groups!).
{
"channels": {
"whatsapp": {
"groupPolicy": "allowlist",
"groups": {
"123456789012345678@g.us": {
"requireMention": false
},
"987654321098765432@g.us": {
"requireMention": true
}
}
}
}
}{
"channels": {
"whatsapp": {
"groupPolicy": "allowlist",
"groups": {
"*": {}
}
}
}
}- Check JID is correct: Group JIDs end in
@g.us - Check groupPolicy: Must be
"allowlist"with your group ingroups, or use"*"wildcard - Check mention: If
requireMentionistrue(default), you must @mention the bot - Restart gateway: Config changes need a restart
The bot appears in the group under whatever name the WhatsApp account is saved as on participants' phones. If you saved the number as "Assistant", that's how you @mention it.
This usually means the group JID is correct but mention detection isn't working:
- Try setting
requireMention: falsetemporarily to confirm messages are reaching the bot - Check the bot's WhatsApp contact name matches what you're typing for @mentions
The group is recognized but messages aren't being forwarded. Usually fixed by:
- Explicitly adding the group JID (instead of
"*"wildcard) - Setting
requireMention: false - Restarting the gateway
- Start with
requireMention: truein busy groups to avoid spam - Use
requireMention: falsefor small family/private groups where you want the bot always listening - Each group gets its own session — context is isolated per group
- The bot sees message history when joining a conversation (configurable via
historyLimit)
Guide created for OpenClaw users. Questions? Join the Discord.