Skip to main content
The WhatsApp adapter sends text notifications to WhatsApp chats using Baileys, an unofficial WhatsApp Web multi-device protocol library.
This integration uses the unofficial WhatsApp Web protocol via Baileys. It is intended for personal use only. For production/business use, implement the official WhatsApp Business API instead. Use at your own risk.
This page covers outbound notifications (Polpo sending you alerts). To chat with Polpo via WhatsApp — send commands, approve tasks, have conversations — see WhatsApp Gateway.

Configuration

{
  "settings": {
    "notifications": {
      "channels": {
        "whatsapp": {
          "type": "whatsapp",
          "chatId": "39123456789@s.whatsapp.net",
          "profileDir": "whatsapp-profiles/default"
        }
      }
    }
  }
}
FieldTypeRequiredDescription
type"whatsapp"YesChannel type
chatIdstringNoDefault recipient JID (e.g. 39123456789@s.whatsapp.net for individuals, 120363...@g.us for groups)
profileDirstringNoCredential storage directory relative to .polpo/. Defaults to whatsapp-profiles/default

Authentication

WhatsApp requires a one-time QR code scan to link the device:
  1. Run the login command:
    polpo whatsapp login
    
  2. Scan the QR code displayed in the terminal with your phone (WhatsApp > Linked Devices > Link a Device)
  3. Credentials are saved to .polpo/whatsapp-profiles/default/ and reused automatically on subsequent starts
Use polpo whatsapp status to check connection state, and polpo whatsapp logout to remove stored credentials.

Message Format

Messages are sent as plain text. Markdown formatting in notifications is stripped to plain text since WhatsApp does not support rich HTML.
SeverityPrefix
info[INFO]
warning[WARN]
critical[CRITICAL]

Connectivity Test

The test() method checks whether the Baileys socket is currently connected and authenticated.

Limitations

  • Text only — no file/image attachments (outbound notifications)
  • Single device profile — one WhatsApp account per profileDir
  • No official API — WhatsApp may change the web protocol at any time
  • Rate limits — WhatsApp enforces undocumented rate limits; avoid high-frequency notifications