# How to create a chatbot in Telegram

#### 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&#x26;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&#x26;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.&#x20;

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&#x26;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>:

<figure><img src="https://2421713157-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizQzM1n6iqF17cIYxrec%2Fuploads%2Fzif43BPfJ9LBtWv8Z0mi%2FENG_Telegram_7.png?alt=media&#x26;token=058d2ed1-a400-4561-a292-f7ee3443eef7" alt=""><figcaption><p>Chatbot integration with #jedidesk</p></figcaption></figure>

***

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

Come back to @BotFather and keep filling your bot.&#x20;

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&#x26;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&#x26;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&#x26;token=a778c6d7-2935-4864-9c4a-02fc2b74b75e" alt=""><figcaption><p>Profile of a finished chatbot in Telegram</p></figcaption></figure>
