> For the complete documentation index, see [llms.txt](https://docs.chainjet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chainjet.io/integrations/telegram.md).

# Telegram Custom Bot

### Fields that require additional information

* ***How to Connect your Telegram Bot Account***

Create a Telegram group or use one in which you are an administrator.

Create a Telegram bot (BotFahter), configure it and add it to the group. Follow the steps in the video below to set up the bot and get the token.

<figure><img src="/files/bKY8WaXVM4bhCCawdyRF" alt=""><figcaption></figcaption></figure>

1 - Go to @BOTFATHER on Telegram\
2 - To begin creating your bot, press START. Select NEW BOT from the bot's menu and pick a name for it, and then the username ends in "bot".\
3 - Here, it will show you the token ID:

<figure><img src="/files/NZEOb90WOuo8San0emhp" alt=""><figcaption></figcaption></figure>

4 - To add the bot to your Telegram group, go to ADD MEMBER and look for your bot with the user name you've given it and add it.

* ***How to get the CHAT ID***

If the Telegram group is **public**, simply add @ to the beginning of the group name found in the link to join. Example: if the link is: t.me/chainjet the ID will be @chainjet.

<figure><img src="/files/SY9v68Tza8z4hc8qxVnm" alt=""><figcaption></figcaption></figure>

For **private groups**, you must use the telegram bot, [RawDataBot](https://t.me/raw_data_bot). Search for that user in telegram and share the group invitation link. The bot will return a message with the ID, just copy it and paste in the corresponding field in your workflow.

<figure><img src="/files/66tuFTroiMXDUn82c0qX" alt=""><figcaption></figcaption></figure>

* ***Give format to Telegram texts***

For Telegram format, you have to choose the formatting style in Parse Mode. You can use HTML, MarkdownV2 and Markdown. Remember to use in the text box the same style that you selected in Parse Mode.

Here is a [link](https://core.telegram.org/bots/api#formatting-options) where you can see all the options from these three styles.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.chainjet.io/integrations/telegram.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
