Skip to main content

Telegram

Send Telegram messages, media and polls as a bot; read recent chats and moderate members.

Connect a Telegram bot (from @BotFather) to work chats end to end: send, edit, pin and delete messages, share photos, documents and polls, read the recent messages the bot can see, inspect chats and their admins, and ban or unban members.

Connect​

Credential fieldRequiredWhere it comes from
Bot token (BOT_TOKEN)YesFrom @BotFather → /newbot (looks like 123456:ABC-…). Identifies and authenticates the bot.
SettingRequiredWhat it is
Default chat (DEFAULT_CHAT_ID)NoChat id or @channelusername used when a tool call omits chatId - handy for notify-style automations.

Tools​

ToolAccessWhat it does
Bot identity (yekar.telegram.get-me)ReadThe connected bot's identity - username, id, and whether it can read all group messages (false means privacy mode hides ordinary group messages from it; disable via @BotFather /setprivacy).
Get chat (yekar.telegram.get-chat)ReadA chat's details - id, type (private/group/supergroup/channel), title, @username and description. Works for any chat the bot is a member of.
List chat admins (yekar.telegram.list-chat-administrators)ReadThe administrators of a group or channel (owners show as 'creator'). Useful before moderation calls - bans need the bot itself to be an admin.
Read recent messages (yekar.telegram.get-updates)ReadRecent messages the bot can see, newest window of its update queue - sender, chat, text and time; optionally filtered to one chat. Also the way to DISCOVER a chat's numeric id: have someone message the chat, then read. Limits: ~24h retention, nothing from before the bot joined, and privacy mode (default on) hides ordinary group messages.
Send message (yekar.telegram.send-message)WriteSend a text message to a chat, group or channel the bot is in. Supports HTML or MarkdownV2 formatting, replying to a message, and silent delivery.
Send photo (yekar.telegram.send-photo)WriteSend a photo to a chat by public URL (Telegram downloads it server-side, ≤5 MB), with an optional caption.
Send document (yekar.telegram.send-document)WriteSend a file to a chat by public URL (Telegram downloads it server-side, ≤20 MB), delivered as a document attachment with an optional caption.
Edit message (yekar.telegram.edit-message)WriteReplace the text of a message the BOT itself sent (bots cannot edit other senders' messages). Submitting identical text is rejected by Telegram as 'message is not modified'.
Delete message (yekar.telegram.delete-message)WriteDelete a message. Bots can always delete their own messages within 48 hours; deleting others' messages requires the bot to be an admin with delete permission. Deletion is permanent and unconfirmed - there is no undo.
Pin message (yekar.telegram.pin-message)WritePin a message in a chat. In groups and channels the bot must be an admin with the pin permission; in private chats it always works.
Unpin message (yekar.telegram.unpin-message)WriteUnpin a message (or, with no messageId, the most recently pinned one). Same admin requirements as pinning.
Send poll (yekar.telegram.send-poll)WritePost a native Telegram poll to a chat - a question with 2–10 answer options, anonymous by default.
Ban member (yekar.telegram.ban-chat-member)WriteBan a user from a group or channel - they are removed and cannot rejoin until unbanned. Requires the bot to be an admin with ban permission. Optionally deletes all their messages.
Unban member (yekar.telegram.unban-chat-member)WriteLift a ban so the user can rejoin (they are NOT re-added automatically). Safe on non-banned users: only_if_banned is always set, so a member who was never banned is left untouched instead of being kicked.

Notes​

  • Message @BotFather on Telegram, send /newbot, and paste the token it issues (123456:ABC-…) to connect - tools act as that bot.
  • Add the bot to every group or channel it should use; for channels, make it an admin with permission to post.
  • To read group messages, disable the bot's privacy mode via @BotFather → /setprivacy - with it on (the default) the bot only sees commands and replies.
  • Find a chat's numeric id with Read recent messages after anyone posts in the chat - public channels can be addressed as @channelusername directly.
  • Optionally set the Default chat property so automation steps can omit chatId entirely.