How to create your own Telegram bot
You can create your own Telegram bot than you can then link to Planfix. Messages sent to this bot by your clients or colleagues will become tasks in Planfix. Comments added to the task that notifies an outside party will be sent to them in Telegram from the bot. This lets you arrange several aspects of your work, from how client messages from mobile devices are processed, to how your support team works, and more.
Creating a Telegram bot
To create your own Telegram bot:
- tap this link (Telegram must be launched on this device)
- in the welcome window, tap the "Start" button.
- in the chat window with @BotFather, enter the /newbot command
- enter the name of the new bot when prompted. The name must end with "bot" or "_bot." It's advisable to choose a name that's somehow associated with your company or line of work. For example, the company BrainStorm could choose the name BrainstormAgencyBot or BrainstormAgency_bot. Once you've entered a name, tap Enter.
- then BotFather will ask you to enter the desired username for the bot. Unlike the name, the username must be unique across Telegram, so for common names you may have trouble finding an unused username. BotFather will inform you if the username is already taken and will ask you to enter another name until you find a unique unused one. After entering it, the bot creation process will complete and you will see the bot token, which you will need for further work.
Linking the Telegram bot to Planfix
To link the bot you've created to Planfix, go to the section Account management / Integrations / Messengers / Telegram and tap "Add bot". In the pop-up window:
- Enter the bot name
- Add the key obtained when creating the bot.
- Specify which template will be used to create tasks from messages received by the bot.
- Specify which template will be used to create a new contact when someone sends a message to the bot.
- Add a list of employees to be added additionally as assignees (in addition to those specified in the task template).
- If necessary, fill in the welcome message field.
Automatic task creation
The bot settings include two independent options that determine when the system creates a task automatically. Both are off by default. Enable them if you don’t want to miss any requests, and leave them off if you are not ready to handle random or empty messages:
- Automatically create a task when the bot is started — a task is created as soon as a person presses the Start button in your bot or sends the /start command — even before they send the first message. If that person does not exist in your system, a contact will be created for them. When this option is off, pressing Start by itself does nothing: a task will appear only after the first real message is sent to the bot.
- Automatically create a task when the bot is added to a group — a task is created as soon as your bot is added to a Telegram group, and the group is immediately attached to that task — regardless of who added the bot. When this option is off, a task for the group must be created manually by an employee using the /task command. This option is useful if your clients create groups for communication and add your bot themselves: without it such correspondence will not enter the system. Details: Connecting a Telegram group to Planfix.
Telegram integration options
The integration has an option to create a new task if there are no active tasks for requests from the client.
The option is enabled by default:
- If the option is active, a new task will be created if the client's previous task was deleted, completed, or is in an inactive status. The message history will automatically be added to the description of the created task.
- If the option is inactive, all messages from the client will go to a single task, regardless of its current status.
Telegram system field
When a customer sends a message to your bot, their Telegram username is automatically added to the "Telegram" system field in Planfix. This username becomes a clickable link that leads directly to the conversation with the customer in the desktop version of the messenger.
Note that the "Telegram" field is filled only if the client has an @username set in the messenger and their privacy settings allow this information to be obtained.
Clicking the link will open a dialog with the contact in the desktop version of the messenger. We implemented this feature for convenience.
Important
- It is not possible to start a conversation in Telegram from Planfix.
- Creating a custom bot is only available in Planfix's paid packages.