Send Telegram Message

Action ID: telegram_send_message

Description

Send a text message to a Telegram chat or channel. This node allows you to deliver messages directly to any Telegram user, group, or channel using your bot connection.

Provider

Telegram

Connection

Name
Description
Required
Category

Telegram Bot Connection

The Telegram bot connection to use for the message.

telegram

Input Parameters

Name
Type
Required
Default
Description

chat_id

string

-

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

text

string

-

Text of the message to be sent, 1-4096 characters after entities parsing

business_connection_id

string

-

-

Unique identifier of the business connection on behalf of which the message will be sent

message_thread_id

integer

-

-

Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

parse_mode

string

-

-

Mode for parsing entities in the message text. Can be 'Markdown', 'MarkdownV2', or 'HTML'

entities

array

-

-

A JSON-serialized list of special entities that appear in message text

link_preview_options

object

-

-

Link preview generation options for the message

disable_notification

boolean

-

-

Sends the message silently. Users will receive a notification with no sound

protect_content

boolean

-

-

Protects the contents of the sent message from forwarding and saving

allow_paid_broadcast

boolean

-

-

Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee

message_effect_id

string

-

-

Unique identifier of the message effect to be added to the message; for private chats only

reply_parameters

object

-

-

Description of the message to reply to

reply_markup

object

-

-

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, etc.

View JSON Schema
{
  "description": "Telegram send message node input.",
  "properties": {
    "chat_id": {
      "title": "Chat ID",
      "type": "string",
      "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)"
    },
    "text": {
      "title": "Message Text",
      "type": "string",
      "description": "Text of the message to be sent, 1-4096 characters after entities parsing"
    },
    "business_connection_id": {
      "title": "Business Connection ID",
      "type": "string",
      "description": "Unique identifier of the business connection on behalf of which the message will be sent"
    },
    "message_thread_id": {
      "title": "Message Thread ID",
      "type": "integer",
      "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"
    },
    "parse_mode": {
      "title": "Parse Mode",
      "type": "string",
      "description": "Mode for parsing entities in the message text. Can be 'Markdown', 'MarkdownV2', or 'HTML'"
    },
    "entities": {
      "title": "Entities",
      "type": "array",
      "description": "A JSON-serialized list of special entities that appear in message text"
    },
    "link_preview_options": {
      "title": "Link Preview Options",
      "type": "object",
      "description": "Link preview generation options for the message"
    },
    "disable_notification": {
      "title": "Disable Notification",
      "type": "boolean",
      "description": "Sends the message silently. Users will receive a notification with no sound"
    },
    "protect_content": {
      "title": "Protect Content",
      "type": "boolean",
      "description": "Protects the contents of the sent message from forwarding and saving"
    },
    "allow_paid_broadcast": {
      "title": "Allow Paid Broadcast",
      "type": "boolean",
      "description": "Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee"
    },
    "message_effect_id": {
      "title": "Message Effect ID",
      "type": "string",
      "description": "Unique identifier of the message effect to be added to the message; for private chats only"
    },
    "reply_parameters": {
      "title": "Reply Parameters",
      "type": "object",
      "description": "Description of the message to reply to"
    },
    "reply_markup": {
      "title": "Reply Markup",
      "type": "object",
      "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, etc."
    }
  },
  "required": [
    "chat_id",
    "text"
  ],
  "title": "TelegramSendMessageInput",
  "type": "object"
}

Output Parameters

Name
Type
Description

sent_message

object

The message that was sent (if successful)

success

boolean

Whether the message was sent successfully

error

string

The error that occurred if the message was not sent successfully

View JSON Schema
{
  "description": "Telegram send message node output.",
  "properties": {
    "sent_message": {
      "title": "Sent Message if successful",
      "type": "object",
      "description": "The message that was sent."
    },
    "success": {
      "title": "Success",
      "type": "boolean",
      "description": "Whether the message was sent successfully."
    },
    "error": {
      "title": "Error",
      "type": "string",
      "description": "The error that occurred if the message was not sent successfully."
    }
  },
  "required": [
    "success"
  ],
  "title": "TelegramSendMessageOutput",
  "type": "object"
}

How It Works

This node sends a text message to a specified Telegram chat or channel using the Telegram Bot API. You provide the recipient's chat ID (or channel username), the message text, and optional formatting parameters. The node returns the sent message object and a success status indicating whether the delivery was successful.

Usage Examples

Example 1: Simple Message to User

Input:

chat_id: "123456789"
text: "Hello! This is a message from my workflow."

Output:

success: true
sent_message: {
  "message_id": 12345,
  "chat": {"id": 123456789},
  "date": 1699564800,
  "text": "Hello! This is a message from my workflow."
}

Example 2: Message to Channel with HTML Formatting

Input:

chat_id: "@my_channel"
text: "<b>Important Update:</b> The system is running normally."
parse_mode: "HTML"

Output:

success: true
sent_message: {
  "message_id": 12346,
  "chat": {"id": -1001234567890},
  "date": 1699564801,
  "text": "Important Update: The system is running normally."
}

Example 3: Silent Notification

Input:

chat_id: "987654321"
text: "Background update completed"
disable_notification: true

Output:

success: true
sent_message: {
  "message_id": 12347,
  "chat": {"id": 987654321},
  "date": 1699564802,
  "text": "Background update completed"
}

Common Use Cases

  • Notifications: Send automated notifications to users, teams, or channels when specific workflow events occur

  • Alert Broadcasting: Broadcast alerts and warnings to multiple channels or user groups

  • Status Updates: Provide real-time status updates about long-running operations

  • Approval Requests: Send messages requesting user approval for workflow actions

  • Data Delivery: Send processed data or reports to Telegram users

  • Event Notifications: Notify about scheduled events, deadlines, or important milestones

  • Error Reporting: Send error messages and troubleshooting information directly to support channels

Error Handling

Error Type
Cause
Solution

Invalid Chat ID

The chat_id doesn't exist or bot doesn't have access

Verify the chat_id is correct and the bot has been added to the chat

Message Too Long

Text exceeds 4096 characters

Split the message into multiple smaller messages or shorten the content

Bot Not Member

The bot hasn't been added to the group or channel

Add the bot to the target group/channel before sending messages

Insufficient Permissions

Bot lacks permission to send messages

Check bot permissions in the Telegram group/channel settings

Rate Limit Exceeded

Too many messages sent too quickly

Implement delays between messages or use the allow_paid_broadcast option

Invalid Parse Mode

Invalid formatting mode specified

Use only 'Markdown', 'MarkdownV2', or 'HTML'

Notes

  • Chat ID Format: For private chats, use the numeric ID. For channels, use the @username format or the numeric ID with a minus prefix.

  • Message Length: Messages are limited to 4096 characters. Longer content should be split into multiple messages.

  • Parse Modes: Use HTML for simple formatting, MarkdownV2 for more complex markdown syntax, or Markdown for basic markdown support.

  • Silent Messages: Setting disable_notification to true sends messages without triggering sound notifications for recipients.

  • Reply Markup: Use reply_markup to add inline keyboards, custom keyboards, or other interactive elements to your messages.

Last updated

Was this helpful?