Telegram Bot logo

Telegram Bot

Community
whatnickcodes
telegram-bot

Telegram bot integration for receiving messages and reactions. Use when setting up Telegram webhooks or managing Telegram bot configuration.

Overview

Publisherwhatnickcodes
Repositoryclappie
Skill nametelegram-bot
Stars
27
Forks
6
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by whatnickcodes on GitHub. Read the source before you install it.

Installation

Install the Telegram Bot AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/whatnickcodes/clappie/tree/main/.claude/skills/telegram-bot
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/whatnickcodes/clappie.git /tmp/clappie
mkdir -p .claude/skills
cp -r /tmp/clappie/.claude/skills/telegram-bot .claude/skills/telegram-bot
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Telegram Bot in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Telegram Bot on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Telegram Bot is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Telegram Bot Skill

Telegram bot integration for receiving messages/reactions and spawning sidekicks.

Setup

1. Create Bot with BotFather

  1. Open Telegram, search for @BotFather
  2. Send /newbot and follow prompts
  3. Copy the bot token (looks like 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)

2. Get Your User ID

  1. Search for @userinfobot in Telegram
  2. Send any message - it replies with your user ID (a number like YOUR_USER_ID)

3. Add to .env

bash
TELEGRAM_BOT_TOKEN=your-bot-token-from-botfather
TELEGRAM_WEBHOOK_SECRET=any-random-secret-string-you-make-up

The TELEGRAM_WEBHOOK_SECRET can be anything - it's used to verify webhooks are from Telegram.

4. Configure Settings

bash
# Enable the bot
echo "true" > recall/settings/telegram-bot/enabled.txt

# Allow your Telegram user ID
echo "YOUR_USER_ID" > recall/settings/telegram-bot/users.txt

# Enable incoming messages
mkdir -p recall/settings/telegram-bot/webhooks
echo "true" > recall/settings/telegram-bot/webhooks/incoming-message.txt

5. Start Sidekick Server

bash
clappie background start sidekicks

6. Expose via Tailscale Funnel

Telegram only allows ports 80, 88, 443, or 8443. Use Tailscale Funnel to proxy:

bash
# Expose port 7777 on HTTPS (Tailscale handles certs)
tailscale funnel 7777

This gives you a URL like https://your-machine.tail1234.ts.net

7. Set Webhook URL

Get your webhook path and set the webhook:

bash
# Get the webhook path
WEBHOOK_PATH=$(cat recall/settings/telegram-bot/webhook-path.txt)

# Set webhook with Telegram (IMPORTANT: include secret_token!)
curl -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/setWebhook" \
  -d "url=https://your-machine.tail1234.ts.net/webhooks/telegram-bot/${WEBHOOK_PATH}" \
  -d "secret_token=${TELEGRAM_WEBHOOK_SECRET}"

Critical: The secret_token parameter must match your TELEGRAM_WEBHOOK_SECRET env var, or signature verification will fail.

8. Verify Webhook

bash
curl "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getWebhookInfo"

Should show your URL with pending_update_count: 0 and no errors.

Settings

All settings in recall/settings/telegram-bot/:

FileDescriptionRequired
enabled.txtSet to true to enableYes
webhook-path.txtSecret URL segment (auto-generated)Auto
users.txtAllowed Telegram user IDs (one per line)Yes
webhooks/incoming-message.txtEnable incoming messagesYes
sidekick-prompt.txtCustom prompt/personality for sidekicks (overrides skill defaults)No

CLI Commands

bash
clappie telegram send <chatId> <message>      # Send text message
clappie telegram photo <chatId> <path>        # Send photo
clappie telegram document <chatId> <path>     # Send document
clappie telegram voice <chatId> <path>        # Send voice message
clappie telegram video <chatId> <path>        # Send video
clappie telegram sticker <chatId> <id>        # Send sticker
clappie telegram react <chatId> <msgId> <emoji>  # React to message
clappie telegram webhook <url>                # Set webhook URL
clappie telegram webhook-info                 # Get webhook status
clappie telegram me                           # Get bot info

Sidekick Extension Commands

When a Telegram sidekick is running, these extra commands are available (registered via sidekickCommands in webhooks/send.js). The sidekick ID is auto-detected from the CLAPPIE_SIDEKICK_ID env var -- no need to type it. Explicit ID still works as an override.

bash
clappie sidekick react <msgId> 👍                  # React to a message
clappie sidekick combo <msgId> 👍 🔥 🎉            # Sequential reaction combo
clappie sidekick sticker <setName> [index]          # Send sticker from set
clappie sidekick sticker <setName> random            # Random sticker from set
clappie sidekick send-file photo "/path" "caption"
clappie sidekick send-file document "/path" "caption"
clappie sidekick send-file voice "/path"
clappie sidekick send-file video "/path" "caption"

These are only available to sidekicks with source: telegram-bot. Internal sidekicks or Slack sidekicks can't use them.

Reactions

When a user reacts to a message, the sidekick receives:

[Reacted with 👍]

Direct CLI (not sidekick):

bash
clappie telegram react YOUR_USER_ID 123 👍

How It Works

  1. User sends message to bot
  2. Telegram POSTs to /webhooks/telegram-bot/{webhook-path}
  3. Server verifies X-Telegram-Bot-Api-Secret-Token header matches TELEGRAM_WEBHOOK_SECRET
  4. Handler parses message, downloads any attachments
  5. Sidekick spawns with message content
  6. Claude can reply via clappie sidekick send, clappie sidekick react, etc.

Troubleshooting

"Invalid signature" errors When setting webhook, you MUST include secret_token:

bash
curl -X POST "https://api.telegram.org/bot.../setWebhook" \
  -d "url=https://..." \
  -d "secret_token=${TELEGRAM_WEBHOOK_SECRET}"

"Bad port" error from Telegram Telegram only allows ports 80, 88, 443, 8443. Use Tailscale Funnel or another reverse proxy.

"Not found" when visiting webhook URL in browser Normal - webhooks only accept POST requests.

Messages not received

  • Is Tailscale Funnel running?
  • Is sidekick server running? (clappie background start sidekicks)
  • Is user ID in users.txt?
  • Check getWebhookInfo for errors

Bot doesn't respond

  • Check sidekick logs: tail -f recall/logs/sidekicks/*.txt
  • Make sure enabled.txt is true

Environment Variables

VariableDescription
TELEGRAM_BOT_TOKENBot token from BotFather
TELEGRAM_WEBHOOK_SECRETSecret for webhook verification (you make this up)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Telegram Bot AI skill do?

Telegram bot integration for receiving messages and reactions. Use when setting up Telegram webhooks or managing Telegram bot configuration.

Why use Telegram Bot on TypingMind?

Because you install it once and use it with any model. Telegram Bot is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Telegram Bot in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/whatnickcodes/clappie/tree/main/.claude/skills/telegram-bot. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Telegram Bot?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Telegram Bot?

As many as you like. As long as a model supports skills, you can use Telegram Bot with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Telegram Bot AI skill free?

It is published on GitHub by whatnickcodes. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇