# Bot. Send Message

Sending a text message in the chat.

<table data-header-hidden><thead><tr><th width="226" valign="top"></th><th width="304" valign="top"></th></tr></thead><tbody><tr><td valign="top">Connection</td><td valign="top">[Link] Connection object to the bot. The variable name in this property must match the variable name in the "Connection" property of the "Bot. Create Connection" block from the Telegram group that was previously used to connect to the Telegram bot.</td></tr><tr><td valign="top">Chat ID</td><td valign="top"><p>[Number] Chat ID. This value can be obtained:</p><ul><li>from the "Bot. Get Message" block in the "Message" property - $TMessage.ChatId;</li><li>from the "Bot. List Chats" block in the "List of Chats" property - $Chats["username"].</li></ul></td></tr><tr><td valign="top">Message ID</td><td valign="top">[Number] You can enter the ID of the message to which you want to reply. This value can be obtained from the "Bot. Get Message" block in the "Message" property - $TMessage.Id</td></tr><tr><td valign="top">Text</td><td valign="top">[Text] Message text.</td></tr><tr><td valign="top">Buttons</td><td valign="top"><p>[Dictionary] A dictionary of buttons that will be sent along with the message. The key of the dictionary is the button name, and the value of the dictionary is the callback data.</p><p>For example: @{ "Back"="butBack"; "Forward"="butForward" }. The values "butBack" and "butForward" will be returned in the $TMessage.CallbackData property. More details are described in the "Callback" property of the "Bot. Get Message" block.</p></td></tr><tr><td valign="top">Number of Button Columns</td><td valign="top">[Number] If the value is empty, the buttons will be arranged in a single row. If a value is specified, the buttons will be arranged in the specified number of columns.</td></tr><tr><td valign="top">Disable Notification</td><td valign="top">When enabled, the delivery notification will not be sent.</td></tr><tr><td valign="top">Disable Preview</td><td valign="top">When enabled, link previews are disabled.</td></tr><tr><td valign="top">HTML Formatting</td><td valign="top">When enabled, text can use formatting with HTML tags. For example: &#x3C;b>Bold text&#x3C;/b>.</td></tr><tr><td valign="top">Message Thread</td><td valign="top">[Number/Text] Specify the thread ID to which the message should be sent. This allows sending a message to a specific group within a supergroup, as well as to the comment chat for a specific channel message. If you are sending a message to a supergroup, then message_thread_id refers to a specific group within the supergroup. If you are writing a comment for a message in a channel, then message_thread_id refers to the comment thread for a specific channel message. This identifier can be obtained using the "Client. Get Message Thread ID" block.</td></tr><tr><td valign="top">Number of Attempts</td><td valign="top">[Number] The number of attempts in case of a connection error with the server.</td></tr><tr><td valign="top">Message</td><td valign="top"><p>[Link] Returns the object of the sent message. Available properties:</p><ul><li>Id - message ID;</li><li>ChatId - chat ID;</li><li>From - username of the sender;</li><li>Text - message text;</li><li>Type - textual designation of the message type;</li><li>IsFile - indicates whether there is a file in the message (the type can be more precisely determined using the IsDocument, IsPhoto properties). For example: $TMessage.IsPhoto - if equal to $true, then there is a photo in the message.</li></ul></td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that blocks will output during operation. Possible values:</p><ul><li>"Default" - default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/spravochnik-blokov/telegram/bot.-otpravit-soobshenie-telegrambotsendtext.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
