Channel Setup
Step-by-step setup for messaging channels used by clawbot agents.
Slack (Socket Mode)
- Create an app at api.slack.com/apps → Create New App → From scratch.
- OAuth & Permissions → Bot Token Scopes: add
app_mentions:read,chat:write,channels:history,groups:history,im:history,reactions:write. - Event Subscriptions → Enable Events → Subscribe to bot events:
app_mention,message.channels,message.groups,message.im. - Socket Mode → Enable Socket Mode → create an App-level token with
connections:write. - Install App to your workspace.
- Add the bot to channels (invite it with
/invite @YourBot). - In agent Channels settings: Bot Token (
xoxb-...), App Token (xapp-...).
In channels, the bot responds only when @mentioned (default group_policy: mention). In DMs, it responds to any message. Run with LOGURU_LEVEL=DEBUG to see why messages are ignored.
Telegram
- Open Telegram and message @BotFather.
- Send
/newbotand follow the prompts (name, username). - Copy the bot token (format:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz). - In agent Channels settings: set
tokento your bot token.
Optional: group_policy: mention (default) — bot replies only when @mentioned in groups. Set to open to reply to all messages.
Discord
- Go to Discord Developer Portal → New Application.
- Bot → Add Bot → Reset Token (copy and store securely).
- OAuth2 → URL Generator: select scopes
bot, permissionsSend Messages,Read Message History,View Channels,Read Messages/View Channels. - Invite the bot to your server using the generated URL.
- In agent Channels settings: set
tokento your bot token.
Feishu / Lark
Uses WebSocket long connection — no public IP or webhook required.
- Create an app at Feishu Open Platform (or Lark for non-China).
- Credentials & Basic Info → copy App ID and App Secret.
- App Capability → enable Bot.
- Event Subscription → enable
im.message.receive_v1. - In agent Channels settings: set
appIdandappSecret.
WhatsApp
Requires the Node.js bridge (bridges/whatsapp/ in this repo). WhatsApp has no official bot API; the bridge uses Baileys to connect via WhatsApp Web.
Docker agents (Marketplace install):
- Install
whatsapp-bridgefrom the Software catalog (Marketplace → Software). The bridge installs and starts automatically viapost_install. - To link your WhatsApp account, open the terminal in the Workspace tab and run:bash
clawbot-whatsapp-bridge - Scan the QR code with WhatsApp (Linked Devices) on your phone. The session is saved automatically. The bridge daemon picks up credentials on next connect — restart the agent if needed.
- In agent Channels settings: enable WhatsApp.
Manual setup:
- Install the bridge:
cd bridges/whatsapp && npm install && npm run build - To link your account (first run): run
clawbot-whatsapp-bridge— QR appears in the terminal, scan it, credentials saved, process exits. No ports opened. - To start the daemon: run
clawbot-whatsapp-bridge start - In agent Channels settings: set
bridgeUrl(defaultws://localhost:3001), optionallybridgeTokenifBRIDGE_TOKENis set.
Bridge env vars: WHATSAPP_BRIDGE_PORT or BRIDGE_PORT (default 3001), AUTH_DIR (auth storage), BRIDGE_TOKEN (optional auth).
Zalo
Uses Zalo Official Account (Bot API) with long-polling — no public IP or webhook required.
- Create a bot at Zalo Bot Platform (or bot.zapps.me).
- Copy the bot token (format:
12345689:abc-xyz). - In agent Channels settings: set
botTokento your bot token. - Optional: add
allowFrom(user IDs) to restrict which users can message the bot. Empty = allow all.
Text is chunked to 2000 characters (Zalo API limit). Media (images) supported via URLs.
Zalo Personal (zalouser)
Uses zca-js via Node.js bridge — requires QR scan to link your personal Zalo account.
- Install and run the Zalo Personal bridge:bashOr install via Software catalog:
cd bridges/zalo && npm install && npm run build && npm startzalo-personal-bridge. - Scan the QR code with Zalo on your phone (first run only).
- In agent Channels settings: set
bridgeUrl(defaultws://localhost:3002), optionallybridgeTokenifBRIDGE_TOKENis set on the bridge.
Bridge env vars: BRIDGE_PORT (default 3002), AUTH_DIR, BRIDGE_TOKEN (optional auth).
Microsoft Teams
Uses Bot Framework. Requires Azure Bot registration and a public URL for the webhook.
- Create a bot at Azure Portal → Azure Bot.
- Copy App ID and create an App Password.
- Set Messaging endpoint to:
https://your-domain/api/webhooks/teams/{agent_id}(replace{agent_id}with your agent's ID). - In agent Channels settings: set
appIdandappPassword. - Start the agent. The webhook receives messages when the agent is running and connected.
Email
Uses IMAP polling for inbound and SMTP for outbound. Requires explicit user consent.
- Enable IMAP on your email provider (Gmail, Outlook, etc.).
- For Gmail: create an App Password (2FA required).
- In agent Channels settings:
consentGranted: true(required — set only after user permission)imapHost,imapPort(993),imapUsername,imapPasswordsmtpHost,smtpPort(587),smtpUsername,smtpPasswordfromAddress(optional, defaults to imap username)
Verification
Microsoft Teams
- Create an Azure Bot and set Messaging endpoint to
https://your-domain/api/webhooks/teams/{agent_id}. - In agent Channels: enable Teams, set
appIdandappPassword. - Start the agent and ensure it connects to the control plane (gateway).
- Add the bot to a Teams chat/channel and message it. The webhook receives the Activity only when the agent is running and connected.
- If no reply: verify the webhook URL is publicly reachable; check agent is enabled and connected; inspect
allowFrom; useLOGURU_LEVEL=DEBUGto see webhook logs.
