Telegram logo

Telegram

Organization
different-ai
telegram

Send notifications and messages via Telegram bot API

Overview

Publisherdifferent-ai
Repositoryopenwork-hub
Skill nametelegram
Stars
34
Forks
14
Bundled files
1
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.

  • 1 bundled files

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

  • Open source

    Published by different-ai on GitHub. Read the source before you install it.

Installation

Install the Telegram 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/different-ai/openwork-hub/tree/main/skills/telegram
  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/different-ai/openwork-hub.git /tmp/openwork-hub
mkdir -p .claude/skills
cp -r /tmp/openwork-hub/skills/telegram .claude/skills/telegram
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Telegram 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 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 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.

Environment Setup

IMPORTANT: Before using any Telegram commands, source the local .env file:

bash
source .skill.config

Credentials are stored in .skill.config (gitignored):

TELEGRAM_BOT_TOKEN=...
TELEGRAM_CHAT_ID=...  # Default chat (legacy, still works)

Multi-Chat Configuration

Chat aliases are stored in telegram-chats.json (gitignored):

json
{
  "chats": {
    "default": { "id": "123456789", "name": "Personal", "description": "Default notifications" },
    "alerts": { "id": "-100987654321", "name": "Alerts", "description": "Critical alerts" },
    "house": { "id": "-4972420459", "name": "House Common", "description": "House group" }
  }
}

Get chat ID by alias

bash
jq -r '.chats.house.id' skills/telegram/telegram-chats.json

List all configured chats

bash
jq -r '.chats | to_entries[] | "\(.key): \(.value.name) (\(.value.id))"' skills/telegram/telegram-chats.json

Quick Usage

Send to default chat

bash
source .skill.config && curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$TELEGRAM_CHAT_ID" \
  -d "text=Hello from OpenCode!"

Send to named chat (using jq)

bash
source .skill.config && CHAT_ID=$(jq -r '.chats.house.id' skills/telegram/telegram-chats.json) && \
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$CHAT_ID" \
  -d "text=Hello House!"

Send to multiple chats

bash
source .skill.config && for chat in default house; do
  CHAT_ID=$(jq -r ".chats.$chat.id" skills/telegram/telegram-chats.json)
  curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
    -d "chat_id=$CHAT_ID" \
    -d "text=Broadcast message!" &
done
wait

Send with Markdown formatting

bash
source .skill.config && curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$TELEGRAM_CHAT_ID" \
  -d "parse_mode=Markdown" \
  -d "text=*Bold* and _italic_ and \`code\`"

Send with HTML formatting

bash
source .skill.config && curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$TELEGRAM_CHAT_ID" \
  -d "parse_mode=HTML" \
  -d "text=<b>Bold</b> and <i>italic</i> and <code>code</code>"

Send with links

bash
source .skill.config && curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$TELEGRAM_CHAT_ID" \
  -d "parse_mode=Markdown" \
  -d "text=Check out [this deal](https://facebook.com/marketplace/item/123)"

Send multi-line message

bash
source .skill.config && curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$TELEGRAM_CHAT_ID" \
  -d "parse_mode=Markdown" \
  --data-urlencode "text=*New Deals Found*

1. \$50 - Vintage Poster [View](link1)
2. \$30 - Movie Poster [View](link2)"

Verify Setup

Check bot is working

bash
source .skill.config && curl -s "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getMe" | jq

Check credentials are set

bash
source .skill.config && echo "Token: ${TELEGRAM_BOT_TOKEN:0:10}... Chat: $TELEGRAM_CHAT_ID"

List all chats from config

bash
jq '.chats' skills/telegram/telegram-chats.json

Common Gotchas

  • Markdown escaping: Use \ before _, *, `, [ if they're literal
  • URL encoding: Use --data-urlencode for messages with special chars
  • Chat ID: Must be a number (personal) or starts with - (group/channel)
  • Bot must be added to group: For group chats, add bot as member first
  • Group chat IDs are negative: They typically start with -100 for supergroups

First-Time Setup (If Not Configured)

1. Create a bot

  1. Open Telegram and message @BotFather
  2. Send /newbot
  3. Choose a name (e.g., "My OpenCode Bot")
  4. Choose a username (must end in bot, e.g., "myopencode_bot")
  5. Copy the token BotFather gives you

2. Get your chat ID

  1. Message your new bot (just say "hi")
  2. Run:
bash
curl -s "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates" | jq '.result[0].message.chat.id'

3. Get group chat IDs

  1. Add the bot to each group
  2. Send a message in the group
  3. Run:
bash
curl -s "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates" | jq '.result[] | select(.message.chat.type != "private") | {title: .message.chat.title, id: .message.chat.id}'

4. Store bot token in .skill.config

Add to .skill.config:

bash
TELEGRAM_BOT_TOKEN=your_token_here
TELEGRAM_CHAT_ID=your_default_chat_id_here

5. Initialize multi-chat config

bash
cp skills/telegram/telegram-chats.example.json skills/telegram/telegram-chats.json

Then edit telegram-chats.json to add your chats:

json
{
  "chats": {
    "default": {
      "id": "YOUR_PERSONAL_CHAT_ID",
      "name": "Personal",
      "description": "My personal notifications"
    },
    "alerts": {
      "id": "GROUP_CHAT_ID",
      "name": "Alerts Group",
      "description": "System alerts"
    }
  }
}

6. Test it

bash
# Test default
source .skill.config && curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$TELEGRAM_CHAT_ID" \
  -d "text=OpenCode connected!"

# Test named chat
source .skill.config && CHAT_ID=$(jq -r '.chats.house.id' skills/telegram/telegram-chats.json) && \
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d "chat_id=$CHAT_ID" \
  -d "text=House chat connected!"

Adding New Chats

Via getUpdates (recommended)

  1. Add bot to the new group or message it privately
  2. Send a message in that chat
  3. Run:
bash
source .skill.config && curl -s "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates" | jq '.result[-1].message.chat'
  1. Add the chat to telegram-chats.json

Discover all recent chats

bash
source .skill.config && curl -s "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates" | \
  jq '[.result[].message.chat] | unique_by(.id) | .[] | {id, title: (.title // .first_name), type}'

Helper: Send Function

For complex scripts, define a helper:

bash
telegram_send() {
  local chat_alias="${1:-default}"
  local message="$2"
  local parse_mode="${3:-Markdown}"
  
  source .skill.config
  local chat_id=$(jq -r ".chats.$chat_alias.id" skills/telegram/telegram-chats.json)
  
  curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
    -d "chat_id=$chat_id" \
    -d "parse_mode=$parse_mode" \
    --data-urlencode "text=$message"
}

# Usage:
telegram_send "house" "Hello from the house chat!"
telegram_send "bargains" "*New deal found!*" "Markdown"

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 AI skill do?

Send notifications and messages via Telegram bot API

Why use Telegram on TypingMind?

Because you install it once and use it with any model. Telegram 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 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/different-ai/openwork-hub/tree/main/skills/telegram. 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?

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?

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

Is the Telegram AI skill free?

It is published on GitHub by different-ai. 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 👇