Updated: October 2, 2024

How to Connect the Enji.ai bot in Telegram

This guide shows users how to create and register the stand-up bot in Telegram for quick and easy stand-up submission.

Bots, Standups and Alerting

Adding the Enji.ai bot to a Telegram chat involves the following steps:

  1. Create a Telegram bot.
  2. Create a group chat in Telegram.
  3. Link the chat to a project in Enji.
  4. Register users (standup participants).

Creating a Telegram bot

It is recommended to create the bot using a corporate, non-personal Telegram account to avoid tying token ownership to an individual employee.

  1. Register the Telegram Bot by opening a chat with BotFather.
  2. Enter /start to activate.
  3. Enter /newbot and follow the instructions to create a new bot.
  • Name (display name): enji.ai
  • Username: Must end with _bot, e.g., example_enji_bot

The Bot token guide: From BotFather to 'Hello World'

4. Save the username and token, and provide them to the DevOps team for setting up environment variables. In the example above, these are:

username=example_enji_bot
token=7461557277:AAGZT9NGvUZuz7Sd4w3Jq0WSN18LpYie9Zw

5. Proceed to the next section of the documentation only after the DevOps variables have been configured.

Creating a group chat in Telegram

1. Create a group chat in Telegram.

2. Add all users to the group.

3. Invite 'enjiai_bot' to the chat and assign the bot the Admin role.

Once the invitation is sent, the bot will automatically register the chat in the Enji database. If the registration is successful, users will receive a notification in the chat: "Channel(s) successfully registered."

4. To ensure the bot has registered the group, log into an Enji account and go to Settings -> Team Channels. This is the list of all registered chats in Enji. The new group will appear in this list if it has been successfully registered.

After successfully registering a Telegram chat in Enji's database, the next step is to link it to a project in Enji. To do this, follow these steps:

  1. Go to Settings -> Project List and click on the project’s ID.
  2. Open the General tab.
  3. In the Workspace field, select "Telegram."
  4. In the Channel field, choose the Telegram chat from the list.
  5. Save the changes.

After a Telegram chat is linked to a project in Enji, project participants need to be linked to the corresponding users in the Telegram chat. Follow these steps:

  1. Log into an Enji account.
  2. Go to Settings → Project list.
  3. Select the new project (or create another one).
  4. In the General tab, find the Project Team section.
  5. Add employees to the list and ensure that each employee is marked as "Is Standuper."

Click on INVITE TO TELEGRAM. Copy the individual links and send them separately to each of the standuppers.

If the Invitation Link for the employee does not appear in the list, make sure that the "Is Active" checkbox is checked in the Employee Card for that employee.

By following these steps, project participants can be matched with users in the Telegram chat and invited to use the Standup Bot.

User registration (standuppers)

With the invite links, project participants can register themselves as standuppers in the Enji bot. The standupper should open the link in the browser and click /start in the chat with the bot.

After that, the user should receive this message in the chat with the bot: "The Telegram user has been matched with the employee named …"

Submitting a stand-up

Next, the user opens the group chat and submits the standup.

When changing the chat type from Private to Public or vice versa, Telegram changes the chat ID.

If this happens, another entry with the new Channel ID will be added to Enji Team Channels!

Make sure the correct Team Channel is added to the project. Otherwise, the bot will respond to the standup with the message: "No project was found with the specified channel for the submission of standups."

A guide for employees: How to Submit a Standup in Telegram