How to Connect Your AI Agent to WhatsApp, Telegram & Discord

Step-by-step setup for every major messaging platform in 2026

Why Multi-Channel Messaging Matters for AI Agents

Your AI agent is only as useful as the channels it can reach. Building a powerful agent with OpenClaw is just the first step. The real value comes when your users can interact with that agent on the platforms they already use every day, whether that is Telegram, Discord, WhatsApp, Slack, or even Signal.

Multi-channel deployment offers several key advantages. First, you meet your users where they are instead of forcing them to visit a separate interface. Second, you increase engagement because people are far more likely to message a bot in their favorite chat app than to open a web dashboard. Third, you can serve different audiences on different platforms. A developer community thrives on Discord, a business client prefers WhatsApp, and an internal team works in Slack.

OpenClaw makes multi-channel deployment straightforward. Each messaging platform is handled by a dedicated adapter that runs independently, so you can connect to all five major platforms simultaneously without any conflicts. In this guide, we will walk through the setup for each platform in detail, compare their capabilities, and help you choose the right channels for your use case.

Tip: If you have not set up OpenClaw yet, start with the EasySetup guide first. You will need a running OpenClaw instance before connecting any messaging platform.

Platform Comparison: Which Messaging App Should You Choose?

Before diving into setup instructions, it helps to understand what each platform offers. The table below compares all five supported messaging platforms across the dimensions that matter most for AI agent deployment.

PlatformSetup TimeBot LimitFile SharingGroup SupportAPI CostBest For
Telegram5 minUnlimitedYesYesFreePower users
Discord10 min1 per appYesYesFreeCommunities
WhatsApp15 min1 numberLimitedYesFree*Business
Slack10 minUnlimitedYesYesFreeWorkspace
Signal20 min1 numberLimitedNoFreePrivacy

* WhatsApp Business API is free for the first 1,000 conversations per month. Beyond that, Meta charges per conversation depending on your region.

For most people starting out, Telegram is the best first choice because it has the fastest setup, no bot limits, and a rich API. If you are building for a gaming or developer community, Discord is ideal. For customer-facing business use cases, WhatsApp has the broadest reach. And for internal teams, Slack is the natural fit.

Telegram Setup: The Fastest Path to a Live AI Bot

Telegram is the most popular platform for AI agent deployment, and for good reason. The Bot API is completely free, setup takes under five minutes, and you can create as many bots as you want. Here is the complete walkthrough.

Step 1: Create Your Bot with BotFather

Open Telegram and search for @BotFather. This is Telegram's official bot for creating and managing bots. Send it the /newbot command to start.

You: /newbot
BotFather: Alright, a new bot. How are we going to call it?
You: My OpenClaw Agent
BotFather: Good. Now let's choose a username for your bot.
You: myopenclawagent_bot
BotFather: Done! Your new bot is created. Use this token to access the HTTP API:
7123456789:AAH1kj2h3kj4h5kj6h7kj8h9kj0h1kj2h3

The username must end in _bot or Bot. Choose something memorable because users will search for this name to find your agent.

Step 2: Get and Secure Your Bot Token

BotFather will give you a token that looks like 7123456789:AAH1kj2h3.... This token is essentially the password for your bot. Anyone who has it can control your bot, so treat it like a secret. Never commit it to a public repository or share it in a chat.

Warning: If your token is ever exposed, immediately go back to @BotFather and use /revoke to generate a new one. The old token will stop working instantly.

Step 3: Configure OpenClaw

With your token in hand, configure OpenClaw to use it. Run the following command on your VPS:

openclaw config set telegram.token YOUR_TOKEN_HERE

You can also configure optional settings like the welcome message, allowed user IDs (for private bots), and group behavior:

# Set a custom welcome message
openclaw config set telegram.welcomeMessage "Hello! I'm your AI assistant. How can I help?"

# Restrict to specific users (optional)
openclaw config set telegram.allowedUsers "user_id_1,user_id_2"

# Enable group mode
openclaw config set telegram.groupMode true

Step 4: Start and Test the Connection

Restart OpenClaw to apply the new configuration:

openclaw restart

Now open Telegram and send a message to your bot. You should see a response within a few seconds. If you do not, check the OpenClaw logs with openclaw logs to diagnose the issue.

Discord Setup: Building a Bot for Your Community

Discord is the go-to platform for community-driven AI agents. Whether you are running a support server, a developer community, or a gaming guild, a Discord bot powered by OpenClaw can handle questions, moderate conversations, and provide real-time assistance.

Step 1: Create a Discord Application

Go to the Discord Developer Portal and click "New Application." Give it a name like "OpenClaw Agent" and accept the terms of service.

Step 2: Create the Bot and Get Your Token

In your new application, navigate to the "Bot" section in the left sidebar. Click "Add Bot" and confirm. You will see a "Token" section. Click "Reset Token" to generate a new one, and copy it immediately. Discord only shows the full token once.

While you are in the bot settings, configure these important options:

Step 3: Set Permissions and Invite the Bot

Go to the "OAuth2" section and select "URL Generator." Under scopes, check bot and applications.commands. Under bot permissions, select:

Copy the generated URL and open it in your browser. Select the server where you want to add the bot and authorize it.

Step 4: Configure in OpenClaw

# Set the Discord bot token
openclaw config set discord.token YOUR_DISCORD_TOKEN

# Set the bot to respond in specific channels only (optional)
openclaw config set discord.channels "general,support,ai-help"

# Enable slash commands
openclaw config set discord.slashCommands true

Restart OpenClaw with openclaw restart and test by sending a message in one of the configured channels. The bot should respond within seconds.

WhatsApp Setup: Reaching Business Customers

WhatsApp is the world's most popular messaging app with over 2 billion users. Connecting your OpenClaw agent to WhatsApp is ideal for customer support, sales inquiries, and appointment booking. There are two approaches: the official WhatsApp Business API and the lighter Baileys library.

Option A: WhatsApp Business API (Recommended for Production)

The official API is the reliable, scalable choice. You will need a Meta Business account and a dedicated phone number.

  1. Create a Meta Business account at business.facebook.com if you do not have one.
  2. Set up a WhatsApp Business Platform app in the Meta Developer Dashboard.
  3. Register a phone number that is not already linked to any WhatsApp account.
  4. Get your API credentials: You will receive a Phone Number ID, WhatsApp Business Account ID, and a permanent access token.
# Configure WhatsApp Business API in OpenClaw
openclaw config set whatsapp.provider "business-api"
openclaw config set whatsapp.phoneNumberId "YOUR_PHONE_NUMBER_ID"
openclaw config set whatsapp.businessAccountId "YOUR_BUSINESS_ACCOUNT_ID"
openclaw config set whatsapp.accessToken "YOUR_ACCESS_TOKEN"

Option B: Baileys Library (Quick and Free)

Baileys is an open-source library that connects to WhatsApp Web via QR code scanning. It is easier to set up but less stable for high-volume use.

# Enable Baileys mode
openclaw config set whatsapp.provider "baileys"

# Start and scan the QR code
openclaw restart

After restarting, OpenClaw will display a QR code in the terminal. Scan it with your phone's WhatsApp app (Settings > Linked Devices > Link a Device). Once linked, your AI agent will respond to incoming messages on that WhatsApp number.

Warning: Baileys uses an unofficial API. WhatsApp may temporarily block your number if you send too many messages too quickly. Use the Business API for production deployments.

Slack Setup: AI for Your Workspace

Slack is where teams communicate, making it an ideal platform for an internal AI assistant. Your OpenClaw agent can answer questions, summarize documents, pull data from integrations, and automate workflows, all within your Slack workspace.

Step 1: Create a Slack App

Go to api.slack.com/apps and click "Create New App." Choose "From scratch," give it a name like "OpenClaw Agent," and select your workspace.

Step 2: Configure OAuth Permissions

Navigate to "OAuth & Permissions" in the sidebar. Under "Bot Token Scopes," add the following permissions:

Step 3: Enable Event Subscriptions

Go to "Event Subscriptions" and turn it on. Set the Request URL to your OpenClaw instance's webhook endpoint, typically https://your-domain.com/webhook/slack. Subscribe to these bot events: app_mention, message.channels, message.groups, and message.im.

Step 4: Install to Workspace and Configure OpenClaw

Click "Install to Workspace" and authorize the app. Copy the Bot User OAuth Token (starts with xoxb-) and the Signing Secret from the app's Basic Information page.

# Configure Slack in OpenClaw
openclaw config set slack.botToken "xoxb-YOUR-BOT-TOKEN"
openclaw config set slack.signingSecret "YOUR_SIGNING_SECRET"
openclaw config set slack.appToken "xapp-YOUR-APP-TOKEN"

# Restart to apply
openclaw restart

Test by mentioning your bot in any channel: @OpenClaw Agent what is the weather today?

Message Limits and Platform Capabilities Compared

Each platform has different constraints on message length, file uploads, rate limits, and rich media support. Understanding these limits is crucial for designing your agent's responses appropriately.

PlatformMax Message LengthFile Size LimitRate LimitRich Media
Telegram4,096 chars50 MB (bot) / 2 GB (user)30 msgs/secButtons, images, documents, audio, video
Discord2,000 chars25 MB (free) / 500 MB (Nitro)5 msgs/5 secEmbeds, images, reactions, threads
WhatsApp65,536 chars16 MB (media) / 100 MB (docs)80 msgs/sec (API)Buttons, lists, images, documents
Slack40,000 chars1 GB (paid plans)1 msg/sec per channelBlocks, attachments, threads, reactions
Signal65,536 chars100 MBUnspecifiedImages, documents, reactions

Notice that Discord has the shortest message limit at 2,000 characters. If your AI agent generates long responses, you will need to either truncate them or split them into multiple messages. Telegram's 4,096-character limit is usually sufficient for most responses, and WhatsApp's generous 65,536-character limit means you rarely need to worry about length.

Pro tip: Configure your AI model's maxTokens parameter to stay within your platform's message limit. For Discord, set it to around 400 tokens. For Telegram, 800 tokens is a safe maximum. This prevents responses from being cut off mid-sentence.

Troubleshooting Common Connection Issues

Even with careful setup, things can go wrong. Here are the most common issues and how to fix them.

Bot Does Not Respond to Messages

This is the number one issue new users encounter. Check these items in order:

  1. Verify your token is correct: Run openclaw config get telegram.token (or the relevant platform) and confirm it matches what you were given.
  2. Check that OpenClaw is running: Run openclaw status to see if the service is active.
  3. Review the logs: Run openclaw logs --tail 50 and look for error messages related to authentication or connection failures.
  4. Check your firewall: Ensure your VPS allows outbound HTTPS connections on port 443. Some platforms also require specific inbound webhook ports.
  5. Verify your AI model is configured: The messaging adapter connects the platform to OpenClaw, but you also need a working AI model. Check with openclaw config get model.

Messages Are Delayed by Several Seconds

Some delay is normal because the AI model needs time to generate a response. However, if delays exceed 10 seconds, the issue is likely your VPS performance or the AI model's response time. Try switching to a faster model like deepseek-chat or upgrading your VPS. See the cost guide for a detailed breakdown of model speeds and prices.

Bot Works in DMs but Not in Groups

For Telegram, ensure that "Group Privacy" is disabled in BotFather settings (/mybots > your bot > Bot Settings > Group Privacy > Turn off). For Discord, check that the bot has the correct channel permissions. For Slack, make sure you subscribed to message.channels events, not just app_mention.

WhatsApp QR Code Keeps Expiring

If you are using the Baileys method and the QR code expires before you scan it, restart OpenClaw and scan quickly. QR codes are only valid for about 20 seconds. If it keeps failing, your phone might have an outdated WhatsApp version. Update WhatsApp and try again.

Rate Limiting and Temporary Bans

If your bot sends too many messages too quickly, platforms will throttle or temporarily block it. This is especially common on WhatsApp when using Baileys. Implement rate limiting in your OpenClaw configuration:

# Set global rate limiting
openclaw config set rateLimit.messagesPerMinute 20
openclaw config set rateLimit.messagesPerHour 200

Frequently Asked Questions

Can I connect my OpenClaw AI agent to multiple platforms at once?

Yes. OpenClaw supports simultaneous connections to Telegram, Discord, WhatsApp, Slack, and other platforms. Each platform runs as a separate adapter, so you can have your agent active on all channels at the same time without conflicts. Simply configure the tokens for each platform and restart OpenClaw. Your agent will begin listening on all configured channels automatically.

Which messaging platform is easiest to connect to OpenClaw?

Telegram is the easiest and fastest platform to connect. You can create a bot with @BotFather in under five minutes and configure it in OpenClaw with a single command. Discord is a close second, though it requires a few more steps in the Developer Portal. WhatsApp takes the longest due to Business API verification requirements.

Do I need a phone number for WhatsApp Business API?

Yes. The official WhatsApp Business API requires a dedicated phone number that is not already registered with a personal WhatsApp account. You can use a virtual phone number from providers like Twilio or MessageBird. If you prefer a simpler approach, the Baileys method lets you link your existing personal WhatsApp number via QR code, though this is not recommended for production use.

Are there any API costs for connecting to messaging platforms?

Telegram, Discord, and Slack bot APIs are completely free to use with no message limits that would affect most users. WhatsApp Business API is free for the first 1,000 conversations per month, then charges between $0.005 and $0.08 per conversation depending on your region and conversation type. Note that the AI model API costs for generating responses are separate from platform fees. See our cost guide for full AI model pricing details.

What happens if my VPS goes offline?

If your VPS goes offline, your bot will stop responding on all connected platforms. Most platforms handle this gracefully: Telegram queues messages and delivers them when the bot reconnects, Slack does the same, and WhatsApp holds messages for up to 30 days. Discord may drop messages that arrive while the bot is offline. To minimize downtime, use a process manager like PM2 (pm2 start openclaw) to auto-restart your agent if it crashes, and consider a VPS provider with strong uptime guarantees.

Can I restrict my bot to respond only to certain users?

Yes. OpenClaw supports allowlists for all platforms. You can configure specific user IDs, group IDs, or channel IDs that the bot should respond to. All other messages will be ignored. This is useful for private assistants or internal company bots.

How do I update my bot's personality across all platforms?

Your bot's personality is defined by the system prompt in OpenClaw's configuration, not by the platform adapter. Change it once with openclaw config set systemPrompt "Your new prompt here" and restart. The updated personality will apply to all connected platforms simultaneously.

Next Steps and Related Guides

Now that you know how to connect your AI agent to messaging platforms, here are some resources to take your setup further:

Set Up OpenClaw Now