How to create your own Telegram bot

From Planfix
Jump to: navigation, search

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.

7Oxc2A.png

  • 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.

vCb2LF.png

  • then BotFather will ask you to enter a username for the bot. Unlike the bot's name, the username must be unique, which could cause issues for more common names. No two Telegram bots can have the same username. BotFather will tell you if the username you chose is already in use and will prompt you to enter another name until you find one that is unique and unused. Once you have entered your username, the bot creation process is complete, and you will see the following message:

WgZYFl.png

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:

rHmUpv.png

  • In the pop-up window, enter the bot's name and the key specified when it was created (highlighted in red in the last screenshot of the dialog with BotFather). Select the template for tasks that will be created based on the messages received by the bot, define the template for a new contact that will send a message to the bot, and list additional employees to be connected as assignees alongside those specified in the task template.

aHiMEM.jpg

Important: When setting up an integration, you can make it so that a new task is created if there is no active task (with any active status) for communication from a client who messages the bot:

Qa1cxM.png

By default, this checkbox is checked. When the checkbox is checked, a new task will be created if the previous task with this client has been deleted or completed, or is inactive. Conversation history will automatically be added to the description of the task created:

NaVOOO.png

When the checkbox is unchecked, all messages from the client will be sent to the original task with this client, regardless of its current status.

Go To