Telegram
Description
Section titled “Description”The Telegram module allows sending text messages and files to Telegram chats or groups through the Telegram Bot API. It includes advanced features such as a “typing…” indicator, automatic splitting of long messages (over 4000 characters), retries with exponential backoff for network errors or rate limiting, Markdown format validation, and automatic fallback to plain text if formatting fails. It is ideal for notifications, alerts and automated communication in workflows.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Telegram bot credentials |
| chatId | text | Yes | Destination chat or group ID |
| message | textarea | Yes | Message to send (supports {{variable}} variables) |
| parse_mode | select | No | Message format: Markdown V2, HTML or no format |
| show_typing | boolean | No | Show “typing…” indicator before sending (default: true) |
Credentials
Section titled “Credentials”The credential must contain the fields:
botToken: Telegram bot token (obtained from @BotFather, format123456:ABC-DEF...)chatId: Default chat ID (can be overridden by the node’s chatId field or bydata.chatId)
To configure the credentials, first create a bot in Telegram via @BotFather and get the token. The chatId can be obtained by sending a message to the bot and querying the Telegram API.
Set up the credential (step by step)
Section titled “Set up the credential (step by step)”-
Create the bot with @BotFather (
/newbot) and copy the token (123456:ABC-DEF...). -
Create the credential in Floogos. Under Credentials → New, pick Telegram and paste the
botToken. Optionally a defaultchatId. -
Select the credential in the node’s Bot credentials field.
See also: Telegram credentials.
Replying to the user who wrote
Section titled “Replying to the user who wrote”When the message comes from the Trigger Receive Telegram node, the trigger leaves the source chat in data.chatId. For the reply to go back to the same user, put {{data.chatId}} in the Chat ID field (or leave it empty: the node uses data.chatId automatically when present). This way you don’t hardcode a chat and it works for any user who writes.
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "status": 200, "telegram_response": "success", "messages_sent": 1 }}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "cred_telegram_01", "chatId": "-1001234567890", "message": "Pedido {{orderId}} procesado correctamente", "parse_mode": "MarkdownV2", "show_typing": true}API Used
Section titled “API Used”- Send message:
POST https://api.telegram.org/bot{token}/sendMessage - Send document:
POST https://api.telegram.org/bot{token}/sendDocument - Typing action:
POST https://api.telegram.org/bot{token}/sendChatAction - Documentation: https://core.telegram.org/bots/api
- Messages over 4000 characters are automatically split into multiple sends
- If Markdown formatting fails, it automatically retries in plain text
- Supports dynamic variables
{{variable}}in the message field - Includes automatic retries (up to 3) with exponential backoff for 429 and 5xx errors
- File caption is limited to 1024 characters by the Telegram API
- The chatId can come from the input data (
data.chatId), from the node configuration, or from the credentials - The default typing_delay is 300ms between message chunks
Related Nodes
Section titled “Related Nodes”- whatsapp (messaging via WhatsApp/Twilio)
- slack (messaging via Slack)