Skip to content

Telegram

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.

ParameterTypeRequiredDescription
credentials_idcredentialsYesTelegram bot credentials
chatIdtextYesDestination chat or group ID
messagetextareaYesMessage to send (supports {{variable}} variables)
parse_modeselectNoMessage format: Markdown V2, HTML or no format
show_typingbooleanNoShow “typing…” indicator before sending (default: true)

The credential must contain the fields:

  • botToken: Telegram bot token (obtained from @BotFather, format 123456:ABC-DEF...)
  • chatId: Default chat ID (can be overridden by the node’s chatId field or by data.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.

  1. Create the bot with @BotFather (/newbot) and copy the token (123456:ABC-DEF...).

  2. Create the credential in Floogos. Under Credentials → New, pick Telegram and paste the botToken. Optionally a default chatId.

  3. Select the credential in the node’s Bot credentials field.

See also: Telegram credentials.

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.

{
"nextModule": "siguiente_modulo",
"data": {
"status": 200,
"telegram_response": "success",
"messages_sent": 1
}
}
{
"credentials_id": "cred_telegram_01",
"chatId": "-1001234567890",
"message": "Pedido {{orderId}} procesado correctamente",
"parse_mode": "MarkdownV2",
"show_typing": true
}
  • 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
  • whatsapp (messaging via WhatsApp/Twilio)
  • slack (messaging via Slack)