OpenClaw Messaging Integration: WhatsApp, Telegram & Slack
Guide on connecting OpenClaw agents to major messaging platforms for cross-platform AI assistant functionality.
Supported Platforms
OpenClaw supports integration with major messaging platforms, enabling you to interact with your AI agent through familiar interfaces:
- WhatsApp: Personal and business messaging
- Telegram: Bot-friendly with rich features
- Discord: Community and team communication
- Slack: Enterprise workspace integration
- Signal: Privacy-focused messaging
- iMessage: Apple ecosystem (macOS only)
Telegram Integration
Step 1: Create a Bot
Message @BotFather on Telegram:
/newbot
Name: My OpenClaw Agent
Username: my_openclaw_bot
Step 2: Configure Environment
# .env
TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklmnoPQRstuVWxyz
TELEGRAM_ALLOWED_USERS=your_telegram_id
Step 3: Enable in Config
// config.js
module.exports = {
messaging: {
platform: 'telegram',
options: {
polling: true,
allowedUsers: process.env.TELEGRAM_ALLOWED_USERS?.split(',')
}
}
}
Discord Integration
Step 1: Create Application
- Go to Discord Developer Portal
- Create New Application
- Navigate to Bot section and create bot
- Copy the bot token
Step 2: Configure Permissions
Required bot permissions:
- Send Messages
- Read Message History
- Attach Files (for screenshots, exports)
- Use Slash Commands (optional)
Step 3: Environment Setup
# .env
DISCORD_TOKEN=your_discord_bot_token
DISCORD_GUILD_ID=your_server_id
DISCORD_CHANNEL_ID=specific_channel_id
Slack Integration
Step 1: Create Slack App
- Visit Slack API
- Create New App → From Scratch
- Select your workspace
Step 2: Configure OAuth & Permissions
Add these OAuth scopes:
chat:write
channels:history
im:history
files:write
Step 3: Enable Socket Mode
For real-time communication without a public endpoint:
# .env
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-token
SLACK_SIGNING_SECRET=your-signing-secret
WhatsApp Integration
Using WhatsApp Business API
For production use, integrate with the official WhatsApp Business API:
# .env
WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id
WHATSAPP_ACCESS_TOKEN=your_access_token
WHATSAPP_VERIFY_TOKEN=your_verify_token
Alternative: WhatsApp Web Bridge
For personal use, you can use browser-based bridges (note: against WhatsApp ToS for automation).
Multi-Platform Configuration
Run your agent across multiple platforms simultaneously:
// config.js
module.exports = {
messaging: {
platforms: [
{
type: 'telegram',
token: process.env.TELEGRAM_BOT_TOKEN
},
{
type: 'discord',
token: process.env.DISCORD_TOKEN
}
],
routingRules: {
// Route specific users to specific contexts
telegram: { contextPrefix: 'tg_' },
discord: { contextPrefix: 'dc_' }
}
}
}
Security Considerations
User Whitelisting
Always restrict which users can interact with your agent:
ALLOWED_USERS=user_id_1,user_id_2,user_id_3
Command Confirmation
Enable confirmation for sensitive operations:
# In AGENTS.md
## Security Rules
- Require explicit confirmation for:
- File deletion
- Email sending
- External API calls
- System commands
Conclusion
Messaging integration transforms OpenClaw from a development tool into a always-available personal assistant. Choose the platform that fits your workflow and follow the security best practices to ensure safe operation.