home / skills / openclaw / skills / whatsapp-ultimate

whatsapp-ultimate skill

/skills/globalcaos/whatsapp-ultimate

This skill enables OpenClaw agents to send WhatsApp messages, search history, and manage chats with full offline indexing and media support.

npx playbooks add skill openclaw/skills --skill whatsapp-ultimate

Review the files below or copy the command above to add this skill to your agents.

Files (7)
SKILL.md
8.1 KB
---
name: whatsapp-ultimate
version: 3.5.1
description: "WhatsApp skill with a 3-rule security gate. Your agent speaks only when spoken to — in the right chat, by the right person."
metadata:
  openclaw:
    emoji: "📱"
    requires:
      channels: ["whatsapp"]
---

# WhatsApp Ultimate

**Everything you can do in WhatsApp, your AI agent can do too.**

This skill documents all WhatsApp capabilities available through OpenClaw's native channel integration. No external Docker services, no CLI wrappers — just direct WhatsApp Web protocol via Baileys.

---

## Prerequisites

- OpenClaw with WhatsApp channel configured
- WhatsApp account linked via QR code (`openclaw whatsapp login`)

---

## Capabilities Overview

| Category | Features |
|----------|----------|
| **Messaging** | Text, media, polls, stickers, voice notes, GIFs |
| **Interactions** | Reactions, replies/quotes, edit, unsend |
| **Groups** | Create, rename, icon, description, participants, admin, invite links |

**Total: 22 distinct actions**

---

## Messaging

### Send Text
```
message action=send channel=whatsapp to="+34612345678" message="Hello!"
```

### Send Media (Image/Video/Document)
```
message action=send channel=whatsapp to="+34612345678" message="Check this out" filePath=/path/to/image.jpg
```
Supported: JPG, PNG, GIF, MP4, PDF, DOC, etc.

### Send Poll
```
message action=poll channel=whatsapp to="+34612345678" pollQuestion="What time?" pollOption=["3pm", "4pm", "5pm"]
```

### Send Sticker
```
message action=sticker channel=whatsapp to="+34612345678" filePath=/path/to/sticker.webp
```
Must be WebP format, ideally 512x512.

### Send Voice Note
```
message action=send channel=whatsapp to="+34612345678" filePath=/path/to/audio.ogg asVoice=true
```
**Critical:** Use OGG/Opus format for WhatsApp voice notes. MP3 may not play correctly.

### Send GIF
```
message action=send channel=whatsapp to="+34612345678" filePath=/path/to/animation.mp4 gifPlayback=true
```
Convert GIF to MP4 first (WhatsApp requires this):
```bash
ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4 -y
```

---

## Interactions

### Add Reaction
```
message action=react channel=whatsapp chatJid="[email protected]" messageId="ABC123" emoji="🚀"
```

### Remove Reaction
```
message action=react channel=whatsapp chatJid="[email protected]" messageId="ABC123" remove=true
```

### Reply/Quote Message
```
message action=reply channel=whatsapp to="[email protected]" replyTo="QUOTED_MSG_ID" message="Replying to this!"
```

### Edit Message (Own Messages Only)
```
message action=edit channel=whatsapp chatJid="[email protected]" messageId="ABC123" message="Updated text"
```

### Unsend/Delete Message
```
message action=unsend channel=whatsapp chatJid="[email protected]" messageId="ABC123"
```

---

## Group Management

### Create Group
```
message action=group-create channel=whatsapp name="Project Team" participants=["+34612345678", "+34687654321"]
```

### Rename Group
```
message action=renameGroup channel=whatsapp groupId="[email protected]" name="New Name"
```

### Set Group Icon
```
message action=setGroupIcon channel=whatsapp groupId="[email protected]" filePath=/path/to/icon.jpg
```

### Set Group Description
```
message action=setGroupDescription channel=whatsapp groupJid="[email protected]" description="Team chat for Q1 project"
```

### Add Participant
```
message action=addParticipant channel=whatsapp groupId="[email protected]" participant="+34612345678"
```

### Remove Participant
```
message action=removeParticipant channel=whatsapp groupId="[email protected]" participant="+34612345678"
```

### Promote to Admin
```
message action=promoteParticipant channel=whatsapp groupJid="[email protected]" participants=["+34612345678"]
```

### Demote from Admin
```
message action=demoteParticipant channel=whatsapp groupJid="[email protected]" participants=["+34612345678"]
```

### Leave Group
```
message action=leaveGroup channel=whatsapp groupId="[email protected]"
```

### Get Invite Link
```
message action=getInviteCode channel=whatsapp groupJid="[email protected]"
```
Returns: `https://chat.whatsapp.com/XXXXX`

### Revoke Invite Link
```
message action=revokeInviteCode channel=whatsapp groupJid="[email protected]"
```

### Get Group Info
```
message action=getGroupInfo channel=whatsapp groupJid="[email protected]"
```
Returns: name, description, participants, admins, creation date.

---

## JID Formats

WhatsApp uses JIDs (Jabber IDs) internally:

| Type | Format | Example |
|------|--------|---------|
| Individual | `<number>@s.whatsapp.net` | `[email protected]` |
| Group | `<id>@g.us` | `[email protected]` |

When using `to=` with phone numbers, OpenClaw auto-converts to JID format.

---

## Tips

### Voice Notes
Always use OGG/Opus format:
```bash
ffmpeg -i input.wav -c:a libopus -b:a 64k output.ogg
```

### Stickers
Convert images to WebP stickers:
```bash
ffmpeg -i input.png -vf "scale=512:512:force_original_aspect_ratio=decrease,pad=512:512:(ow-iw)/2:(oh-ih)/2:color=0x00000000" output.webp
```

### Acknowledgment Messages (ackMessage)
Send an instant text message when an inbound message is received — fires at gateway level before model inference:
```json
{
  "channels": {
    "whatsapp": {
      "ackMessage": {
        "text": "⚡",
        "direct": true,
        "group": "never"
      }
    }
  }
}
```
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `text` | string | `""` | Message to send (empty = disabled) |
| `direct` | boolean | `true` | Send in direct chats |
| `group` | `"always"` / `"mentions"` / `"never"` | `"never"` | Group behavior |

This is different from `ackReaction` (which sends an emoji reaction). `ackMessage` sends a standalone message bubble — visible in WhatsApp Web even when reaction flips aren't.

### Rate Limits
WhatsApp has anti-spam measures. Avoid:
- Bulk messaging to many contacts
- Rapid-fire messages
- Messages to contacts who haven't messaged you first

### Message IDs
To react/edit/unsend, you need the message ID. Incoming messages include this in the event payload. For your own sent messages, the send response includes the ID.

---

## Comparison with Other Skills

| Feature | whatsapp-ultimate | wacli | whatsapp-automation | gif-whatsapp |
|---------|-------------------|-------|---------------------|--------------|
| Native integration | ✅ | ❌ (CLI) | ❌ (Docker) | N/A |
| Send text | ✅ | ✅ | ❌ | ❌ |
| Send media | ✅ | ✅ | ❌ | ❌ |
| Polls | ✅ | ❌ | ❌ | ❌ |
| Stickers | ✅ | ❌ | ❌ | ❌ |
| Voice notes | ✅ | ❌ | ❌ | ❌ |
| GIFs | ✅ | ❌ | ❌ | ✅ |
| Reactions | ✅ | ❌ | ❌ | ❌ |
| Reply/Quote | ✅ | ❌ | ❌ | ❌ |
| Edit | ✅ | ❌ | ❌ | ❌ |
| Unsend | ✅ | ❌ | ❌ | ❌ |
| Group create | ✅ | ❌ | ❌ | ❌ |
| Group management | ✅ (full) | ❌ | ❌ | ❌ |
| Receive messages | ✅ | ✅ | ✅ | ❌ |
| Two-way chat | ✅ | ❌ | ❌ | ❌ |
| External deps | None | Go binary | Docker + WAHA | ffmpeg |

---

### 3.5.0

- **Added:** `ackMessage` — gateway-level instant message acknowledgment. Sends a configurable text message (e.g. ⚡) the moment an inbound message arrives, before any model inference. Fires at the same speed as `ackReaction` (emoji flip). Useful as a visual cue to distinguish your messages from bot replies in WhatsApp Web where reaction flips aren't visible.

### 3.4.0

- **Fixed:** Chat search now resolves LID/JID aliases — searching by chat name finds messages across both `@lid` and `@s.whatsapp.net` JID formats
- **Added:** `resolveChatJids()` cross-references chats, contacts, and messages tables to discover all JID aliases for a given chat filter
- **Improved:** Search falls back to original LIKE behaviour if no JIDs resolve, so no regressions

### 3.0.0

```
Your Agent
    ↓
OpenClaw message tool
    ↓
WhatsApp Channel Plugin
    ↓
Baileys (WhatsApp Web Protocol)
    ↓
WhatsApp Servers
```

No external services. No Docker. No CLI tools. Direct protocol integration.

---

## License

MIT — Part of OpenClaw

---

## Links

- OpenClaw: https://github.com/openclaw/openclaw
- Baileys: https://github.com/WhiskeySockets/Baileys
- ClawHub: https://clawhub.com

Overview

This skill is a complete WhatsApp integration for OpenClaw agents that sends messages, media, polls, stickers, voice notes, reactions and replies while providing full-text searchable history. It uses a native Baileys integration (no Docker or external services) and includes features like voice transcription, chat export import, full history resync, and an instant visual processing indicator called the Thinking Heartbeat. Owner voice/media bypasses trigger filters so audio interactions work reliably in groups.

How this skill works

The agent connects to WhatsApp via Baileys and stores messages in a persistent SQLite database with FTS5 for instant full-text search. Incoming media and voice notes can be downloaded and transcribed; chat exports can be imported and indexed. When processing a message the agent reacts with a temporary 🤔 to indicate progress (the Thinking Heartbeat) and removes it when the reply is sent; owner voice/media bypass triggerPrefix rules so audio triggers are not dropped.

When to use it

  • Send text, images, video, documents, voice notes, stickers or GIFs from an agent account
  • Manage groups: create, rename, set icon/description, add/remove/promote participants and manage invite links
  • Run polls in chats and react or reply to specific messages with emoji or quoted replies
  • Search WhatsApp history by keyword, sender, or date and import exported chat logs (.txt)
  • Transcribe voice messages and include transcripts with replies
  • Resync or restore a full chat history after re-linking the WhatsApp session

Best practices

  • Use OGG/Opus for voice notes to ensure proper playback and transcription
  • Keep agent verbosity off in WhatsApp to avoid sending intermediate tool output; send only final responses
  • Use the messagePrefix (emoji or short tag) so recipients can identify agent messages in group chats
  • Avoid bulk or rapid-fire messaging to prevent WhatsApp anti-spam limits
  • Refer to groups by human-friendly names when talking to people; use groupInfo to resolve JIDs

Example use cases

  • Customer support agent replying with voice note and transcript, logged into searchable history
  • Team coordination: create project group, post polls, collect votes and produce a daily summary
  • Archive and index exported chat files for compliance or research, then run keyword searches
  • Automated moderator: detect mentions, react with thinking heartbeat, and reply or remove messages as configured
  • Owner sends a voice command in a group (bypasses triggerPrefix) and the agent performs actions like scheduling or information lookup

FAQ

Do I need Docker or external services to run this skill?

No. The integration uses native Baileys and runs without Docker, CLI binaries, or external APIs.

How does the Thinking Heartbeat work in groups?

When the agent starts processing a message it reacts with 🤔 on the triggering message; the reaction is removed automatically when the reply is sent, giving visible progress feedback even where typing indicators are not relayed.