# Telegram

## What is Telegram?

Telegram is a messaging app that allows you to send and receive messages, photos, videos, and other files over the internet. It is similar to other messaging apps like WhatsApp and Facebook Messenger. Telegram also offers several additional features, such as the ability to create groups with up to 200,000 members, channels for broadcasting messages to large audiences, and bots that can perform automated tasks like sending reminders or providing information.

## Add a new Telegram connection

1. Start a chat with [Botfather](https://telegram.me/BotFather).\
   ![Botfather is an official Telegram bot to create and manage other bots](/files/jJa5Lj5b0PpfZOU4GA1n)  *Botfather is an official Telegram bot to create and manage other bots*
2. Click **Menu >** **create a new bot** or enter `/newbot`.
3. Enter a name for your bot (this can be changed later).
4. Enter a username for your bot (this cannot be changed later).
5. Copy the **token** value from the answer to the **Bot token** field on Plumber.

   <figure><img src="/files/jB5VTwrdYGyzlWaiUyYL" alt=""><figcaption></figcaption></figure>
6. Click **Connect** and you're done :tada:!

## Send a message

<table><thead><tr><th width="168.078125">Field</th><th width="437.375">Description</th><th width="121.6328125">Required</th></tr></thead><tbody><tr><td>Chat ID</td><td>Select a chat, group or channel you want to send a message to.<br><br>Plumber will show a dropdown of recent chats that the Bot has interacted with. If your chat does not appear in the list, see <a href="#my-chat-does-not-appear-in-the-dropdown-list">here</a>.<br><br>If <a href="https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a">you know your Chat ID</a>, you can also manually enter it.</td><td>✔️</td></tr><tr><td>Message</td><td><p>This is your message body.</p><p></p><p>It support simple Markdown formatting.<br></p><p><strong>Basic formatting:</strong></p><ul><li><code>*text*</code> - bold text</li><li><code>_text_</code> - italic text</li><li><code>`text`</code> - monospace/code text</li><li><code>[text](URL)</code> - links</li></ul><p></p><p><strong>Code blocks:</strong></p><ul><li><code>text</code> - for multi-line code blocks (using triple backticks)</li></ul><p>No support for strikethrough, underline, or spoiler text</p></td><td>✔️</td></tr><tr><td>Disable notification</td><td>Defaults to <strong>No.</strong> If set to <strong>Yes</strong>, the recipient(s) will not receive a notification for the mesas</td><td>Defaults to <strong>No.</strong></td></tr><tr><td>Channel Topic</td><td><p>This is only applicable to Telegram channels with groups. If you are unsure, please leave this field empty.</p><p></p><ul><li>To enable topics in your telegram group, go to <code>Group Settings > Edit > "Topics"</code>. Toggle it on. </li><li>Create a Topic: <code>Tap the three dots > "New Topic."</code> Enter a title and tap "Create."</li><li><p>To get the topic ID for your group: </p><ol><li>Send a message to that topic, then right-click on it and select <code>Copy Message Link</code>. </li><li>Paste it on a notepad and notice that it has the following structure <code>https://t.me/c/XXXXXXXXXX/YY/ZZ</code>. The topic ID is <code>YY</code> (integer).</li></ol></li></ul></td><td></td></tr></tbody></table>

## Common errors

## Check step

Clicking **Check step** will send a telegram message to the configured telegram chat. If you are just testing, send it to a test chat first before selecting the intended chat.

## FAQ

<details>

<summary>Adding (or re-adding) bots to groups or channels</summary>

1. Access your private message with your bot. (You can do this by clicking your bot's @username in [BotFather](https://telegram.me/BotFather))
2. Tap on your bot's name at top to view profile.
3. Click on **Add to Group or Channel**\
   ![](/files/aeJfEQyyHcJbZlm2FEL3)

</details>

<details>

<summary>Allowing bots to read group messages</summary>

1. In [BotFather](https://telegram.me/BotFather), type `/mybots`
2. Select your bot
3. Bot Settings > Group Privacy
4. Click **Turn off**\
   ![](/files/GIFsYBiv7hwgWebMATmi)

</details>

<details>

<summary>Can I send attachments using this Telegram action?</summary>

This Telegram action does not support sending attachments.

</details>

<details>

<summary>My chat does not appear in the dropdown list!<br></summary>

This dropdown list shows chats with recent activity in the past 24 hours. If your chat is missing, try the following:

**For private messages,** send your bot a message directly.

**For group chats,** ensure your bot has been added to the group. Next, either send a message in the group chat (only works if your bot has [read permissions](#allowing-bots-to-read-group-messages)) or [re-invite your bot](#adding-or-re-adding-bots-to-groups-or-channels) to the group.

**For channels,** ensure your bot has been added as an admin to the channel and send a message to the channel with your own telegram account.

Then, click on the **Refresh Items** button at the bottom of the list

</details>


---

# 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://guide.plumber.gov.sg/user-guides/actions/telegram.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.
