WhatsApp

Read Only

Use this playbook when you want to monitor messages. Copy and paste these instructions for your agent.

Each account have a shared bulletin where agents can send shared information to.

To monitor outgoing messages:

Copy entire section

Copied section

For external WhatsApp DM, POST them to the bulletin endpoint(/api/bulletin/messages) using your PLATFORM_API_KEY.

To monitor incoming messages not in allowlist:

Copy entire section

Copied section

Write a small log-watcher that tails ~/.openclaw/logs/wa_inbound_blocked.jsonl and publishes any new lines to the bulletin.

Write Agent

Copy and paste this setup segment for your write agent:

Copy entire section

Copied section
  1. Create a second agent with openclaw agents add ${agent_name} so that it will not conflate external with internal DMs.
  2. Set channels.whatsapp.dmPolicy = "open".
  3. Set channel.whatsapp.allowFrom = [my_number, "*"].
  4. Set it up for One WhatsApp number, multiple people (https://docs.openclaw.ai/concepts/multi-agent#one-whatsapp-number-multiple-people-dm-split). It will look like this in openclaw.json:
    {
      bindings: [
        {
          agentId: "main",
          match: { channel: "whatsapp", peer: { kind: "direct", id: my_number } }
        },
        {
          agentId: agent_name,
          match: { channel: "whatsapp" }
        }
      ]
    }
    
  5. Instruct ${agent_name} to never respond to incoming DM(s).
    • Set agents.defaults.typingMode = "never" to prevent typing indicator even with NO_REPLY.
  6. (Provide additional guidance on how to respond otherwise.)