Skip to main content
Telegram Bot logo

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

FieldDescriptionRequiredFormat
Telegram Bot TokenYour Telegram Bot token obtained from @BotFatherYes-

Available Actions

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
text
string
required
Text of the message (1-4096 characters)
parse_mode
string
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
disable_notification
boolean
Send silently with no sound (Default: false)
reply_to_message_id
integer
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
photo
string
required
Photo to send (file_id or HTTP URL)
caption
string
Photo caption (0-1024 characters)
parse_mode
string
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
disable_notification
boolean
Send silently with no sound (Default: false)
reply_to_message_id
integer
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
document
string
required
Document to send (file_id or HTTP URL)
caption
string
Document caption (0-1024 characters)
parse_mode
string
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
disable_notification
boolean
Send silently with no sound (Default: false)
reply_to_message_id
integer
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
video
string
required
Video to send (file_id or HTTP URL)
caption
string
Video caption (0-1024 characters)
duration
integer
Duration of sent video in seconds
parse_mode
string
Mode for parsing entities (‘Markdown’, ‘MarkdownV2’, or ‘HTML’)
disable_notification
boolean
Send silently with no sound (Default: false)
reply_to_message_id
integer
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
audio
string
required
Audio to send (file_id or HTTP URL)
caption
string
Audio caption (0-1024 characters)
duration
integer
Duration of the audio in seconds
performer
string
Performer of the audio
title
string
Track name
disable_notification
boolean
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
from_chat_id
string
required
Chat where the original message was sent
message_id
integer
required
Message identifier in from_chat_id
disable_notification
boolean
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
message_id
integer
required
Identifier of the message to edit
text
string
required
New text of the message (1-4096 characters)
parse_mode
string
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
message_id
integer
required
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
message_id
integer
required
Identifier of the message to pin
disable_notification
boolean
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"
}

Parameters

chat_id
string
required
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"
}

Parameters

chat_id
string
required
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"
}

Parameters

offset
integer
Identifier of the first update to be returned
limit
integer
Number of updates to retrieve (1-100) (Default: 100)
timeout
integer
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
user_id
integer
required
Unique identifier of the target user
until_date
integer
Date when the user will be unbanned (Unix time)
revoke_messages
boolean
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"
}

Parameters

chat_id
string
required
Unique identifier for the target chat or @username of the target channel
user_id
integer
required
Unique identifier of the target user
only_if_banned
boolean
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"
}

Parameters

chat_id
string
required
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": "GetChatOutput",
  "type": "object"
}

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": "GetMeOutput",
  "type": "object"
}

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).

Pinterest

Slack

WhatsApp