Rahsaz Telegram icon

Rahsaz Telegram

Sends data to Telegram

Overview

The "Send Message" operation of the Rahsaz Telegram node allows sending text messages to a specified Telegram chat or channel. It supports rich message formatting and interactive elements such as inline keyboards, reply keyboards, and force reply options. This node is useful for automating communication via Telegram bots, such as sending notifications, alerts, or interactive prompts to users or groups.

Practical examples include:

  • Sending a notification message to a group chat when an event occurs.
  • Sending a message with an inline keyboard for quick user responses.
  • Sending a message that forces the user to reply, useful in surveys or confirmations.

Properties

Name Meaning
Chat ID Unique identifier for the target chat or username of the target channel (in the format @channelusername).
Text The text content of the message to be sent.
Reply Markup Additional interface options for the message. Options include:
- Force Reply: Shows reply interface to the user.
- Inline Keyboard: Adds an inline keyboard next to the message.
- None: No additional interface.
- Reply Keyboard: Adds a custom reply keyboard.
- Reply Keyboard Remove: Removes the custom keyboard.
Force Reply Configuration for force reply markup:
- Force Reply (boolean): Whether to show reply interface as if user tapped 'Reply'.
- Selective (boolean): Whether to force reply from specific users only.
Inline Keyboard Defines rows of buttons for an inline keyboard attached to the message. Each button can have:
- Text label
- Callback data sent on press
- Pay button option
- Switch inline query options
- URL to open on press.
Reply Keyboard Defines rows of buttons for a custom reply keyboard. Each button can have:
- Text label
- Request contact (boolean): Sends user's phone number when pressed (private chats only).
- Request location (boolean).
Reply Keyboard Options Options for the reply keyboard:
- Resize Keyboard (boolean): Request clients to resize keyboard vertically.
- One Time Keyboard (boolean): Hide keyboard after use.
- Selective (boolean): Show keyboard to specific users only.
Reply Keyboard Remove Options to remove the custom keyboard:
- Remove Keyboard (boolean): Request clients to remove keyboard.
- Selective (boolean): Force removal for specific users only.
Additional Fields Extra optional parameters:
- Append n8n Attribution (boolean): Add "This message was sent automatically with n8n" to the end.
- Disable Notification (boolean): Send silently without sound.
- Disable WebPage Preview (boolean): Disable link previews.
- Reply To Message ID (number): If replying to a message.
- Message Thread ID (number): Forum topic ID.
- Parse Mode (string): How to parse text (Markdown, MarkdownV2, HTML).

Output

The node outputs an array of JSON objects representing the response from the Telegram API for each message sent. The json field contains the full API response, which typically includes details about the sent message such as message ID, chat info, date, and content.

If binary data is involved (e.g., sending files), the node handles uploading the file from binary input fields but the output remains JSON describing the result of the send operation.

Dependencies

  • Requires a valid Telegram Bot API token configured in the node credentials.
  • Uses Telegram Bot API endpoints to send messages and manage chat interactions.
  • Supports binary data upload for media files if enabled.

Troubleshooting

  • Missing or invalid Chat ID: Ensure the Chat ID or channel username is correct and accessible by the bot.
  • File name missing for binary uploads: When sending files from binary data, a file name must be provided either in the binary property metadata or manually in the "File Name" field under Additional Fields.
  • API errors from Telegram: Errors returned by Telegram API (e.g., unauthorized, bad request) will be thrown. Check bot permissions and parameter correctness.
  • Incorrect reply markup configuration: Ensure that the selected reply markup type matches the provided configuration fields.
  • Silent messages not working: Verify the "Disable Notification" flag is set correctly; some clients may still notify depending on settings.

Links and References

Discussion