Overview
Add Telegram Bot to any ModuleX agent or workflow. Telegram Bot API integration via direct HTTP against api.telegram.org/bot<token>/<method>. Covers messaging, chat/member management, and a long-poll updates feed.
Categories : Communication · Communication & Collaboration · Automation · Development · Social Media · Messaging · Auth : Bot Token · Actions : 17
Authentication
Bot Token Authentication
Authenticate using your Telegram Bot token from @BotFather
Required Credentials
Field Description Required Format Telegram Bot Token Your Telegram Bot token obtained from @BotFather Yes -
Available Actions
send_text_message — Send a text message to a Telegram chat. Supports Markdown, MarkdownV2, and HTML formatting.
Parameters Unique identifier for the target chat or @username of the target channel
Text of the message (1-4096 characters)
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
Send silently with no sound (Default: false)
ID of the message to reply to
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "SendTextMessageOutput" ,
"type" : "object"
}
send_photo — Send a photo to a Telegram chat. Photos can be sent by URL or file_id.
Parameters Unique identifier for the target chat or @username of the target channel
Photo to send (file_id or HTTP URL)
Photo caption (0-1024 characters)
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
Send silently with no sound (Default: false)
ID of the message to reply to
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "SendPhotoOutput" ,
"type" : "object"
}
send_document — Send a document or file to a Telegram chat.
Parameters Unique identifier for the target chat or @username of the target channel
Document to send (file_id or HTTP URL)
Document caption (0-1024 characters)
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
Send silently with no sound (Default: false)
ID of the message to reply to
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "SendDocumentOutput" ,
"type" : "object"
}
send_video — Send a video to a Telegram chat.
Parameters Unique identifier for the target chat or @username of the target channel
Video to send (file_id or HTTP URL)
Video caption (0-1024 characters)
Duration of sent video in seconds
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
Send silently with no sound (Default: false)
ID of the message to reply to
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "SendVideoOutput" ,
"type" : "object"
}
send_audio — Send an audio file to a Telegram chat.
Parameters Unique identifier for the target chat or @username of the target channel
Audio to send (file_id or HTTP URL)
Audio caption (0-1024 characters)
Duration of the audio in seconds
Send silently (Default: false)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "SendAudioOutput" ,
"type" : "object"
}
forward_message — Forward a message from one chat to another.
Parameters Unique identifier for the target chat or @username of the target channel
Chat where the original message was sent
Message identifier in from_chat_id
Send silently (Default: false)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "ForwardMessageOutput" ,
"type" : "object"
}
edit_text_message — Edit a text message previously sent by the bot.
Parameters Unique identifier for the target chat or @username of the target channel
Identifier of the message to edit
New text of the message (1-4096 characters)
Mode for parsing entities
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "EditTextMessageOutput" ,
"type" : "object"
}
delete_message — Delete a message from a chat (messages older than 48 hours cannot be deleted).
Parameters Unique identifier for the target chat or @username of the target channel
Identifier of the message to delete
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "DeleteMessageOutput" ,
"type" : "object"
}
pin_message — Pin a message in a chat. Bot must be an administrator with can_pin_messages permission.
Parameters Unique identifier for the target chat or @username of the target channel
Identifier of the message to pin
Pin silently (Default: false)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "PinMessageOutput" ,
"type" : "object"
}
get_chat_member_count — Get the number of members in a chat.
Parameters Unique identifier for the target chat or @username of the target channel
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "GetChatMemberCountOutput" ,
"type" : "object"
}
get_chat_administrators — Get a list of administrators in a chat with their permissions.
Parameters Unique identifier for the target chat or @username of the target channel
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "GetChatAdministratorsOutput" ,
"type" : "object"
}
get_updates — Get incoming updates via long polling: messages, edited messages, channel posts, and other events.
Parameters Identifier of the first update to be returned
Number of updates to retrieve (1-100) (Default: 100)
Timeout in seconds for long polling (Default: 0)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "GetUpdatesOutput" ,
"type" : "object"
}
ban_chat_member — Ban a user from a group, supergroup, or channel. Bot must be an administrator.
Parameters Unique identifier for the target chat or @username of the target channel
Unique identifier of the target user
Date when the user will be unbanned (Unix time)
Delete all messages from the chat for the user (Default: false)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "BanChatMemberOutput" ,
"type" : "object"
}
unban_chat_member — Unban a previously banned user.
Parameters Unique identifier for the target chat or @username of the target channel
Unique identifier of the target user
Do nothing if the user is not banned (Default: true)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "UnbanChatMemberOutput" ,
"type" : "object"
}
create_chat_invite_link — Create an additional invite link for a chat. Bot must have can_invite_users permission.
Parameters Unique identifier for the target chat or @username of the target channel
Invite link name (0-32 characters)
Unix timestamp when the link will expire
Maximum number of users (1-99999)
Users joining need admin approval (Default: false)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"result" : {
"default" : null ,
"title" : "Result"
}
},
"required" : [
"success"
],
"title" : "CreateChatInviteLinkOutput" ,
"type" : "object"
}
get_chat — Get up-to-date information about a chat including title, description, photo, and settings.
get_me — Get basic information about the bot — its username, name, and capabilities.
Limits & Quotas
Media (send_photo / send_document / send_video /
send_audio) accepts a file_id or HTTPS URL only — local
file uploads via multipart aren’t supported here (the legacy
implementation didn’t actually upload bytes either, despite the
docstring claim — we preserve the simpler behavior).
Failures (Telegram ok: false, HTTP errors, exceptions) all
surface as success=False + error carrying the upstream
description field where available.
delete_message only works for messages younger than 48 hours
(Telegram constraint).
Links