How to Use OpenClaw on Telegram and WhatsApp – Complete Guide with Basic Commands

🤖 OpenClaw on Telegram & WhatsApp

Your complete animated guide to AI-powered messaging automation

📱 Telegram
💬 WhatsApp
🔧 Basic Commands
⚡ AI Automation

📌 What is OpenClaw?

OpenClaw is an open-source AI automation framework that lets you deploy intelligent bots on messaging platforms like Telegram and WhatsApp. It uses natural language processing to understand user messages and execute automated workflows — making it a powerful tool for businesses, agencies, and developers.

✈️

Telegram Bot

Deploy AI bots via Telegram Bot API. Supports groups, channels and direct messages.

💬

WhatsApp Bot

Connect via WhatsApp Business API or Baileys library for automated conversations.

🚀 Step-by-Step Setup: Telegram

1

Create a Telegram Bot

Open Telegram → Search for @BotFather → Send /newbot → Follow the prompts to get your Bot Token

2

Install OpenClaw

Run in terminal: git clone https://github.com/openclaw/openclaw then cd openclaw && npm install

3

Configure Telegram Token

Edit your .env file: set TELEGRAM_BOT_TOKEN=your_token_here

4

Start the Bot

Run npm run start:telegram — your bot is now live on Telegram!

$ npm run start:telegram
✅ OpenClaw Bot connected to Telegram
📡 Listening for messages…
🤖 Bot: @MyAIBot is now ONLINE

📲 Step-by-Step Setup: WhatsApp

1

Install Baileys Library

Run: npm install @whiskeysockets/baileys in your OpenClaw directory

2

Configure WhatsApp in .env

Set WHATSAPP_ENABLED=true and WHATSAPP_SESSION_NAME=openclaw

3

Scan QR Code

Run npm run start:whatsapp → Scan the QR code with your WhatsApp mobile app

4

Bot Goes Live

Once connected, OpenClaw listens for incoming messages and processes them through your AI workflows

$ npm run start:whatsapp
📱 Scan QR Code with WhatsApp…
✅ WhatsApp session authenticated!
🤖 OpenClaw is listening on WhatsApp

⌨️ Basic OpenClaw Commands

Once your bot is running, these are the core commands available on both Telegram and WhatsApp:

Command Platform Description
/start Telegram Initialize the bot and display welcome message
/help Both List all available commands and usage tips
/ask [question] Both Ask the AI any question — powered by LLM
/workflow [name] Both Trigger a named automation workflow
/status Both Check bot connection and health status
/reset Both Clear conversation context and start fresh
/schedule [task] [time] Both Schedule a task or message for later
/broadcast [message] Telegram Send a message to all subscribed users (admin only)
/setlang [code] Both Set bot response language (en, ar, es, fr…)
/config Both View or update bot configuration settings

🎬 Live Demo: AI Chat in Action

Here’s an animated preview of OpenClaw responding to user messages:

👤 User: /ask What is the weather today in Dubai?
🤖 Bot: Fetching weather data for Dubai…
🌤️ Dubai Weather: 38°C, Sunny, Humidity 45%
Wind: 15 km/h NW | UV Index: High
👤 User: /workflow lead-capture
🤖 Bot: Starting lead capture workflow…
📋 Step 1: Collecting contact info
✅ Step 2: Saving to CRM (GoHighLevel)
📧 Step 3: Sending welcome email
🎉 Lead successfully captured!
👤 User: /schedule “Send report” 09:00
🤖 Bot: ⏰ Scheduled: “Send report” at 09:00 AM
📅 Date: Tomorrow
✅ Task saved to queue

🔗 Connecting OpenClaw to n8n Workflows

OpenClaw integrates seamlessly with n8n automation to create powerful AI pipelines. When a user sends a command, OpenClaw can trigger an n8n workflow via webhook:

# openclaw/config/workflows.json
{
“lead-capture”: “https://your-n8n.com/webhook/lead”,
“send-report”: “https://your-n8n.com/webhook/report”,
“crm-update”: “https://your-n8n.com/webhook/crm”
}

This allows your Telegram and WhatsApp bot to seamlessly trigger multi-step automations involving GoHighLevel CRM, email systems, Google Sheets, and more.

💡 Pro Tip: Always use environment variables for API tokens and never hardcode them in your configuration files. Use a .env file and add it to .gitignore to keep your credentials secure.
⚠️ Important: WhatsApp’s Terms of Service restrict certain types of bulk messaging. Always ensure your use case complies with WhatsApp Business Policy before deploying at scale.

📦 Full .env Configuration Reference

# OpenClaw .env Configuration
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
WHATSAPP_ENABLED=true
WHATSAPP_SESSION_NAME=openclaw_session
OPENAI_API_KEY=your_openai_api_key
N8N_WEBHOOK_URL=https://your-n8n-instance.com
ADMIN_USER_ID=your_telegram_user_id
BOT_LANGUAGE=en
LOG_LEVEL=info
Scroll to Top