Skip to content
Skills Library
Marketing & content · Tool integration

telegram-bot

/telegram-bot

Publish to your Telegram channel/group via a bot using the official Telegram Bot API — send text or photo posts, edit and delete messages, and verify the bot's access to a chat. Use when the user wants to broadcast to a Telegram channel/group with a bot token (BotFather), cross-post an article, or manage the bot's posts. Distinct from the personal-account Telegram connector.

Repository
Skills ↗
Licence
Apache-2.0
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Publish to your Telegram channel/group via a bot using the official Telegram Bot API — send text or photo posts, edit and delete messages, and verify the bot's access to a chat. Use when the user wants to broadcast to a Telegram channel/group with a bot token (BotFather), cross-post an article, or manage the bot's posts. Distinct from the personal-account Telegram connector.

Original author description

Publish to your Telegram channel/group via a bot using the official Telegram Bot API — send text or photo posts, edit and delete messages, and verify the bot's access to a chat. Use when the user wants to broadcast to a Telegram channel/group with a bot token (BotFather), cross-post an article, or manage the bot's posts. Distinct from the personal-account Telegram connector.

How it works

  1. Step 1 — verify the bot + target
  2. Send a text post
  3. Send a photo with caption
  4. Edit / delete a message
  5. Gotchas
Original SKILL.md headings · 94 lines, 520 words
SKILL.md preview
---
name: telegram-bot
description: Publish to your Telegram channel/group via a bot using the official Telegram Bot API — send text or photo posts, edit and delete messages, and verify the bot's access to a chat. Use when the user wants to broadcast to a Telegram channel/group with a bot token (BotFather), cross-post an article, or manage the bot's posts. Distinct from the personal-account Telegram connector.
when_to_use: |
  Trigger when the user wants a Telegram BOT to post to their channel / group:
  send a text or photo message, edit or delete a message, or check that the bot
  is an admin of the target chat. Auth is a bot token from @BotFather; the bot
  must be an admin (with post rights) in the target channel/group. This acts as
  the bot, so confirm the text and target chat_id before sending publicly.
connections: [telegrambot]
allowed_tools: [Bash]
license: Apache-2.0
metadata:
  author: acedatacloud
  version: "1.0"
---

Call the **official Telegram Bot API** with `curl + jq`. The bot token is
injected as `$TELEGRAMBOT_BOT_TOKEN`; an optional default target chat is
`$TELEGRAMBOT_CHAT_ID` (e.g. `@your_channel` or a numeric id). Base URL:
`https://api.telegram.org/bot$TELEGRAMBOT_BOT_TOKEN/<METHOD>`.

Every response is JSON `{"ok":true,"result":...}` on success, or
`{"ok":false,"error_code":<n>,"description":"<msg>"}` on failure — always check
`.ok` and show `description` verbatim. Common failures: `401 Unauthorized` = bad/
revoked token (reconnect the connector), `400 Bad Request: chat not found` = wrong
chat_id, `403 Forbidden: bot is not a member of the channel chat` / `... need
administrator rights` = add the bot to the channel as an admin with post rights,
`429` with `parameters.retry_after` = rate-limited, wait that many seconds.

`chat_id` is `@channelusername` (public) or the numeric id (private channels/
groups, often negative like `-1001234567890`). Resolve/verify it with `getChat`.

## Step 1 — verify the bot + target

```bash
BOT="https://api.telegram.org/bot$TELEGRAMBOT_BOT_TOKEN"
curl -sS "$BOT/getMe" | jq '{ok, bot: .result.username, name: .result.first_name}'
# confirm the bot can post to the target chat (must be admin in the channel):
CHAT="${TELEGRAMBOT_CHAT_ID:-@your_channel}"
curl -sS -G "$BOT/getChat" --data-urlencode "chat_id=$CHAT" \
  | jq '{ok, type: .result.type, title: .result.title, error: .description}'
```

## Send a text post

**Confirm the text and target chat with the user before posting publicly.** Text
is 1-4096 chars. Use `parse_mode=HTML` (simplest) or `MarkdownV2`.

```bash
CHAT="${TELEGRAMBOT_CHAT_ID:-@your_channel}"
curl -sS -G "$BOT/sendMessage" \
  --data-urlencode "chat_id=$CHAT" \
  --data-urlencode "text=<b>Hello</b> from the bot 👋  #ai" \
  --data-urlencode "parse_mode=HTML" \
  --data-urlencode "disable_web_page_preview=false" \
  | jq '{ok, message_id: .result.message_id, error: .description}'
```

The public post URL for a channel is `https://t.me/<channelusername>/<message_id>`.

- **HTML mode** supports `<b> <i> <u> <s> <a href> <code> <pre> <blockquote>`.
  Escape literal `< > &` as `&lt; &gt; &amp;`.
- **MarkdownV2** requires escaping `_ * [ ] ( ) ~ \` > # + - = | { } . !` with `\`.
- Always send `text` via `--data-urlencode` so newlines/Cyrillic/emoji aren't mangled.

## Send a photo with caption

```bash
CHAT="${TELEGRAMBOT_CHAT_ID:-@your_channel}"
curl -sS -G "$BOT/sendPhoto" \
  --data-urlencode "chat_id=$CHAT" \
  --data-urlencode "photo=https://cdn.example.com/pic.jpg" \
  --data-urlencode "caption=<b>Caption</b> text" \
  --data-urlencode "parse_mode=HTML" \
  | jq '{ok, message_id: .result.message_id, error: .description}'
```

`photo` accepts an HTTPS URL (≤5 MB, Telegram fetches it), a Telegram `file_id`,
or an uploaded file. Caption is 0-1024 chars. For an album use `sendMediaGroup`.

## Edit / delete a message

```bash
# edit text (same chat_id + message_id)
curl -sS -G "$BOT/editMessageText" \
  --data-urlencode "chat_id=$CHAT" --data-urlencode "message_id=123" \
  --data-urlencode "text=Updated text" --data-urlencode "parse_mode=HTML" \
  | jq '{ok, error: .description}'

# delete a message
curl -sS -G "$BOT/deleteMessage" \
  --data-urlencode "chat_id=$CHAT" --data-urlencode "message_id=123" \
  | jq '{ok, error: .description}'
```

`deleteMessage` works for the bot's own channel posts within 48 hours (and needs
`can_delete_messages`/post rights).

## Gotchas

- **The bot must be added to the channel/group as an admin** with post rights, or
  sends return `403`. `getChat` first to confirm access.
- Channel numeric ids are large negative numbers (`-100...`); prefer `@username`
  for public channels.
- Free broadcast limit is ~30 msg/s; space out bulk sends or you'll hit `429`
  (respect `parameters.retry_after`).
- This is the **bot** speaking (not your personal account) — for reading your own
  DMs / groups as yourself, use the `telegram` (MTProto) connector instead.

Versions

The database has no other skills named telegram-bot.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version cc80957b36f9 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100telegram
    Read and send messages in the connected Telegram bot's chats via the Telegram Bot API, and help the user finish bot setup. Use when the user asks to send a Telegram message, reply in a chat or group, download a file someone sent, or connect a Telegram bot.
  • 95telegram-id
    Find a Telegram ID — the user's own numeric Telegram user ID, or the ID of a public channel, group or bot — with Catalogue App (@catalogue_app). Use when the user asks "what is my Telegram ID", needs a user ID or chat ID for a bot, an API, an allowlist or an admin setting, or…
  • 90configure
    Set up the Telegram channel — save the bot token and review access policy. Use when the user pastes a Telegram bot token, asks to configure Telegram, asks "how do I set this up" or "who can reach me," or wants to check channel status.
  • 100telegram-channel
    Telegram for a Pots bot. How to connect a Telegram bot yourself (BotFather, its token, groups, bot.json), topics, files and limits, and how to post buttons under a message (inline keyboards), get clicks, mark a question answered, and send tables. Use when you connect Telegram,…
  • 100telegram-post
    Use when the user wants to post or schedule to a Telegram channel or group through Publora, using a bot. Covers Telegram markdown, silent delivery, link previews and forward protection. Bot API caps media captions at 1,024 characters and videos at 50 MB. Not for other platforms…
  • 90telegram-bot-builder
    Create a Telegram bot for the user in one click with Catalogue App (@catalogue_app) — no @BotFather, no token, no server (Telegram managed bots, 2026). Use when the user asks to make, launch or set up a Telegram bot (support bot, feedback bot, anonymous questions, shop, paid or…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.