telegram
Telegram bot management. Create, deploy, and manage multiple Telegram bots on Cloudflare Workers. USE FOR: (1) Create new Telegram bots; (2) Deploy AI chatbo...
npx skills add telegram
telegram
Telegram bot management. Create, deploy, and manage multiple Telegram bots on Cloudflare Workers. USE FOR: (1) Create new Telegram bots; (2) Deploy AI chatbo...
npx skills add telegram
telegram
Telegram bot management. Create, deploy, and manage multiple Telegram bots on Cloudflare Workers. USE FOR: (1) Create new Telegram bots; (2) Deploy AI chatbots to Telegram channels/groups; (3) Manage multiple bots from one codebase; (4) Set up webhooks; (5) Send messages to channels. TRIGGERS: telegram bot, telegram channel, telegram group, telegram message, telegram webhook, create telegram bot, deploy telegram bot.
Telegram Bot Skill
Create and manage multiple Telegram bots deployed on Cloudflare Workers via SkillBoss.
Architecture
Telegram Cloud → Webhook → Cloudflare Worker → SkillBoss AI API → Response → Telegram
Each bot is registered with @BotFather, gets a token, and uses a webhook pointing to your Cloudflare Worker. The Worker routes messages to the right bot handler and can call SkillBoss AI APIs for intelligent responses.
Setup — Step by Step
1. Create a bot via @BotFather
Open Telegram, message @BotFather:
/newbot
→ Name: My AI Bot
→ Username: my_ai_bot
Save the token: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
Repeat for each bot you want.
2. Register bot tokens
Add tokens to the skill config:
node ~/.openclaw/workspace/skills/telegram/scripts/manage.js add-bot \
--name "my-ai-bot" \
--token "123456:ABC-DEF..." \
--type "ai-chat" \
--system-prompt "You are a helpful assistant."
3. Deploy the Worker
From inside a project directory, or create a new one:
node ~/.openclaw/workspace/skills/skillboss/scripts/serve-build.js publish-worker .
4. Set webhooks
After deploying, set the webhook for each bot:
node ~/.openclaw/workspace/skills/telegram/scripts/manage.js set-webhook \
--name "my-ai-bot" \
--url "https://your-worker.heyboss.live/webhook/my-ai-bot"
5. Verify
node ~/.openclaw/workspace/skills/telegram/scripts/manage.js status
Bot Types
ai-chat (default)
AI-powered chatbot. Responds to messages using SkillBoss AI gateway.
- Supports: text messages, inline queries
- Configurable: model, system prompt, temperature
- Default model:
openai/gpt-4o(fast + cheap) - Use for: news feeds, daily updates, content curation
- Can be triggered by cron or external webhook
- Use for: utility bots, moderation, polls, lookups
channel-poster
Posts content to a channel on a schedule or via API.
command-bot
Responds to specific /commands with custom logic.
Multi-Bot Setup
One Cloudflare Worker handles ALL your bots. Each bot gets a unique webhook path:
https://your-worker.heyboss.live/webhook/{bot-name}
The Worker reads the bot name from the URL, looks up the config, and routes to the right handler.
Script Reference
manage.js — Bot Management CLI
Add a new bot
node scripts/manage.js add-bot --name "bot-name" --token "BOT_TOKEN" --type "ai-chat"
Remove a bot
node scripts/manage.js remove-bot --name "bot-name"
List all bots
node scripts/manage.js list
Check bot status (webhook info, me)
node scripts/manage.js status [--name "bot-name"]
Set webhook for a bot
node scripts/manage.js set-webhook --name "bot-name" --url "https://..."
Delete webhook
node scripts/manage.js delete-webhook --name "bot-name"
Send a message to a chat/channel
node scripts/manage.js send --name "bot-name" --chat "@channel_name or chat_id" --text "Hello!"
Send a message with markdown
node scripts/manage.js send --name "bot-name" --chat "@channel" --text "bold _italic_" --parse-mode "MarkdownV2"
api.js — Telegram API Helper
Low-level Telegram Bot API wrapper:
Call any Telegram Bot API method
node scripts/api.js --token "BOT_TOKEN" --method "getMe"
node scripts/api.js --token "BOT_TOKEN" --method "sendMessage" --params '{"chat_id":"@channel","text":"Hello"}'
Worker Template
The template at templates/worker-telegram-bot/ provides:
Environment Variables (in wrangler.toml)
[vars]
SKILLBOSS_API_KEY = "sk-..."
SKILLBOSS_API_URL = "https://api.heybossai.com/v1"
TELEGRAM_BOTS = '{"my-bot":{"token":"...","type":"ai-chat","model":"openai/gpt-4o","systemPrompt":"..."}}'
Examples
Quick: One AI chatbot
1. Create bot via @BotFather, get token
2. Add bot
node scripts/manage.js add-bot --name "my-ai" --token "TOKEN" --type "ai-chat" \
--system-prompt "You are a friendly AI assistant that speaks Chinese and English."
3. Create project from template & deploy
4. Set webhook
node scripts/manage.js set-webhook --name "my-ai" --url "https://worker-url/webhook/my-ai"
Multiple bots
Bot 1: AI chat for personal group
node scripts/manage.js add-bot --name "personal-ai" --token "TOKEN1" --type "ai-chat" \
--model "openai/gpt-4o" --system-prompt "Casual, friendly assistant"
Bot 2: AI chat for work group
node scripts/manage.js add-bot --name "work-ai" --token "TOKEN2" --type "ai-chat" \
--model "bedrock/claude-4-5-sonnet" --system-prompt "Professional business assistant"
Bot 3: News channel poster
node scripts/manage.js add-bot --name "news-poster" --token "TOKEN3" --type "channel-poster"
Reviews
Write a Review
- No reviews yet. Be the first to review!
Get Weekly AI Skills
Join 500+ one-person companies receiving curated AI tools every week.
Reviews
Write a Review
- No reviews yet. Be the first to review!
Get Weekly AI Skills
Join 500+ one-person companies receiving curated AI tools every week.
Comments & Discussion
Add a comment