Telegram Settings
The Telegram bot the system uses to chat with people and send notifications. This is where the bot token is entered, together with the people incoming messages are forwarded to.
Where to find it: Modules → System → Settings → Telegram Settings
What the bot does
- Chats. Anyone who writes to the bot gets a card in the Telegram register. Their messages land in that card's chat, and replies are sent from the same chat.
- Copies of incoming messages. The bot forwards every incoming message to the people on the "Users" tab of this setting, signed with who sent it.
- Task notifications. Telegram-type notifications and task approval buttons go to the task executor — to the Telegram card whose "User" field holds their login.
- Commands. /list_tasks — tasks not yet closed, /find_task — approve a task by its number, /ts — the timesheet. Commands act on behalf of the user given in the "User" field of the Telegram card.
Field descriptions
- Token — the bot token issued by BotFather (how to create a bot — see the instructions). The field is write-only: nobody can read the saved token. After saving, the field shows a mask. Leave it as is — the token stays; type a new one — it replaces the old one; clear the field — the token is erased on saving, and the bot stops.
- Comment — a free-form note.
- Users (tab) — who receives copies of incoming messages. Telegram ID is chosen from the Telegram register cards, so the person must first write to the bot themselves. Comment — a note for the row.
Starting the bot
- Create a bot in BotFather and copy the token.
- Paste it into "Token" and save. The bot starts on the server right after saving. The system offers to reload the page — agree, so that open windows see the bot.
- Write anything to the bot — your card appears in the Telegram register. Fill in "User" (for task notifications and commands) and "Employee" (for birthday and timesheet reminders) on it.
Common situations
The bot answers a command with "❗ Select user for your telegram record in ERPJS!". The person's Telegram card has no "User". Fill it in with the login the bot should act for.
The bot answers "⛔ This user is not allowed to login". The user on the Telegram card is closed or barred from logging in. The bot follows the same rules as logging in to the system.
Task notifications do not arrive in Telegram. The Telegram card has no "User" with the task executor's login — or the person has never written to the bot, so there is no card at all.
The token was changed. The old bot stops and the new one starts right away. Telegram chats belong to a bot, so people have to write to the new bot.
Several companies in the database. Only one bot runs per database, so the token is entered in one company only.