> For the complete documentation index, see [llms.txt](https://docs.jedidesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jedidesk.com/english/chatbots/how-to-create-a-chatbot-in-telegram.md).

# How to create a chatbot in Telegram

Step-by-step tutorial for creating a chatbot in the Telegram messenger

{% hint style="info" %}
**Channel availability.** START includes the website chat widget only. MINI includes the widget plus **one** channel of your choice: Instagram, Messenger, Telegram, Viber, WhatsApp, Email, E-Chat or Telegram Business. PRO and PRO+ include the widget and all available channels. Creating a bot on an external platform and connecting it to JediDesk are separate steps. Check your plan before connecting a channel; external platform fees are separate from JediDesk.
{% endhint %}

**Navigation:**

1. [Creating a chatbot](#id-1.-creating-a-chatbot)
2. [Chatbot integration with #jedidesk](#id-2.-chatbot-integration-with-jedidesk)
3. [Design of the chatbot: profile picture](#id-3.-design-of-the-chatbot-profile-picture)
4. [Design of the chatbot: bot description](#id-4.-design-of-the-chatbot-bot-description)
5. [Result](#id-5.-result)

***

**1. Creating a chatbot**

Start the [@BotFather](https://t.me/botfather) bot with the **/start** command (or button) and select the **/newbot** command:

<div><figure><img src="https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2FAlAKLSek8jIqFTcPIxet%2FENG_Telegram_1.png?alt=media&amp;token=12ddb662-0a05-4afb-bcc8-2e89f811c960" alt=""><figcaption><p>Launching @BotFather</p></figcaption></figure> <figure><img src="https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2FHxxpqoEm3Pfbqr11Aywf%2FENG_Telegram_2.png?alt=media&amp;token=2fc2cc83-6184-4fac-a97c-b49ff50e4f06" alt=""><figcaption><p>@BotFather's menu</p></figcaption></figure></div>

{% hint style="danger" %} <mark style="color:red;">**Note**</mark>**:** If you lose access to the phone number you use to create the bot, you will permanently lose access to control the bot via @BotFather without the possibility of recovery.
{% endhint %}

***

Give your bot a name and username.

It is important that the username of the bot has the ending ***Bot*** or **\_bot**.

What is the difference between a name and a username? The username works as a link to go to the bot.

{% hint style="danger" %} <mark style="color:red;">**Note**</mark>**:** Unlike the bot name, you will not be able to edit the username in the future!
{% endhint %}

***

Next, you will receive an API token:

<figure><img src="https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2FnEWjZ8fYHz6Tcc9cXw5T%2FENG_Telegram_3.png?alt=media&amp;token=7800954a-dfbc-4453-82ed-59f5e60a3637" alt=""><figcaption><p>Creating a chatbot in Telegram</p></figcaption></figure>

Click on the text from the API, it will be automatically copied.

***

**2. Chatbot integration with #jedidesk**

On the #jedidesk service, open the **Settings ->** [**Integrations**](https://app.jedidesk.com/integrations) tab, paste the copied API token and click <mark style="background-color:blue;">**Activate**</mark>:

***

**3. Design of the chatbot: profile picture**

Come back to @BotFather and keep filling your bot.

To upload a profile picture to your bot, enter the **/setuserpic** command.

Select your bot from the list and send the image as a regular photo:

<figure><img src="https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2FjsSXPI7IYKwFhefRe4bw%2FENG_Telegram_4.png?alt=media&amp;token=86a2cbd5-a14b-4740-91a0-a1806ad96065" alt=""><figcaption><p>Chatbot avatar settings in Telegram</p></figcaption></figure>

{% hint style="info" %}
**Tip:** to preserve aesthetics and proportions, it is advisable to upload images with a 1:1 (square) ratio, as Telegram will crop rectangular images and you may lose part of the composition or the information indicated on the image.
{% endhint %}

***

**4. Design of the chatbot: bot description**

To add a description to your bot, enter the **/setabouttext** command.

Select your bot from the list and send your text as a regular message:

<figure><img src="https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2FonzYkZLx3c5o8jehr8t6%2FENG_Telegram_5.png?alt=media&amp;token=df029cc5-2067-48ab-9641-d589c317a5b4" alt=""><figcaption><p>Setting the description of the chatbot in Telegram</p></figcaption></figure>

***

**5. Result**

<figure><img src="https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2FsMpsoYr3h2iIPH6Ts2ES%2FENG_Telegram_6.png?alt=media&amp;token=a778c6d7-2935-4864-9c4a-02fc2b74b75e" alt=""><figcaption><p>Profile of a finished chatbot in Telegram</p></figcaption></figure>

**Current connection form in JediDesk** (Ukrainian interface example):

![Current telegram connection form](https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2F4w34pKzBQWE9FLQM1eJl%2Fcurrent-telegram.jpg?alt=media)
