Telegram MCP Server
Send messages, documents and formatted reports through a Telegram bot from workflows
The Telegram MCP server lets your workflows send text messages, documents and formatted reports through a Telegram bot. It provides 4 tools.
Setup
1. Create a Bot
- Open Telegram and search for @BotFather.
- Send
/newbotand follow the prompts to name your bot. - BotFather replies with a bot token (looks like
123456789:ABC-DEF1234ghIkl-zyx57W2v1u123ew11). - Copy this token.
2. Add the Bot to Your Chat
The bot must already be a member of the chat it writes to - bots cannot add themselves. Add it to the group or channel once through the chat's invite flow, or start a direct chat with it.
3. Find the Chat ID (optional)
You only need a chat ID if you want a default recipient; every tool also takes its own chat_id.
- Send any message to your bot (or in the group where it is a member).
- Open this URL in a browser, replacing
YOUR_BOT_TOKENwith the token:https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates - Look for
"chat":{"id":in the JSON response. That number is the chat ID.
Group and supergroup IDs are negative (-1001234567890); direct chats are positive. You can also run the get_updates tool once the server is added.
4. Add to FlowTrux
- Go to Resources > MCP Servers > Add Server (OWNER or ADMIN).
- Choose Telegram Bot.
- Give the configuration a Name and paste the Bot Token.
- Optionally enter a Default Chat ID - tools send there when a call does not pass
chat_id. - Under Available in workspaces, pick the workspaces that may use it, then click Add Server.
Tools
send_message
Send a text message to a Telegram chat.
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | No | Telegram chat ID. Defaults to the server's Default Chat ID. |
text | string | Yes | Message text (supports Markdown or HTML) |
parse_mode | string | No | Text parsing mode. One of: Markdown, MarkdownV2, HTML. Default: "HTML". |
disable_notification | boolean | No | Send silently without notification. Default: false. |
send_document
Send a document or file to a Telegram chat. Pass exactly one source: s3_key, file_base64 + filename, or document_url (see Sending files below). Maximum 50 MB.
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | No | Telegram chat ID. Defaults to the server's Default Chat ID. |
s3_key | string | No | Storage key of a file in FlowTrux (the key returned by the files or pdf tools). Uploaded to Telegram as bytes. |
file_base64 | string | No | Base64-encoded file content, uploaded as bytes. Requires filename. A data:…;base64,… prefix is accepted and stripped. |
document_url | string | No | Public URL of the document. Telegram fetches it from its own servers, so it must be reachable from the public internet. |
caption | string | No | Short text shown with the file, up to 1024 characters. |
parse_mode | string | No | Formatting for caption. Leave it empty for plain text - with a mode set, Telegram rejects the whole send on stray markup characters. One of: Markdown, MarkdownV2, HTML. |
filename | string | No | File name shown in Telegram. Required with file_base64; defaults to the key's file name for s3_key; ignored for document_url. |
send_formatted_report
Send a formatted report with metrics (pre-styled for analytics)
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | No | Telegram chat ID. Defaults to the server's Default Chat ID. |
title | string | Yes | Report title. |
metrics | object | Yes | Key-value pairs of metrics to display. |
summary | string | No | Optional summary text. |
get_updates
Get recent messages/updates (useful for testing bot connection)
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of updates to retrieve. Default: 10. |
Limits to know
- A text message is limited to about 4096 characters;
send_formatted_reportsplits a long summary into several messages for you. If one part is refused, the tool says how many parts were sent. - A document caption is limited to 1024 characters. A longer caption is refused rather than cut - send long text with
send_message. - A document can be up to 50 MB.
MarkdownV2requires escaping many characters (_*[]()~`>#+-=|{}.!). Plain text orHTMLavoids that.
Sending files
send_document takes exactly one source:
s3_key- thekeyreturned by the Files or PDF Generator tools. Use this for anything your workflow created or stored in FlowTrux.file_base64+filename- bytes you already hold, for example from an HTTP request.document_url- only for a file that is publicly reachable on the internet. Telegram downloads it from its own servers, so a private or temporary FlowTrux download link fails with "wrong HTTP URL specified".
Example Workflow
A monitoring alert:
- Trigger - Schedule (every 30 minutes).
- Action - HTTP request to a service health endpoint that answers JSON such as
{"status": "ok"}. - Logic - If-else:
{{steps.health.output.data.status}} !== "ok". - Action - MCP tool
telegram:send_messagewithtext"Service is down: {{steps.health.output.data.status}}".