Albato
  • Language
    En
    English
    Portuguese
    Spanish
  • Welcome to Albato Help

    How to Set up and Track Tasks with Telegram Bot in Bitrix24


    IN THIS ARTICLE

    Projects and tasks are often discussed in messengers such as Telegram. It’s a good idea to transfer them to a CRM—if not, the tasks can get lost. Moreover, it’s hard to keep track of their statuses.

    In this case study, we will show how to automate both processes with Albato. Tasks will be set in Telegram and transferred automatically to Bitrix24. Task reports can be requested via Telegram.

    You can find the bundles from this case study in Albato. It’s a set of customized automations that can be installed in a few clicks.

    Note: You will need to connect your Telegram, Google Sheets, and Bitrix24 accounts.

    For detailed instructions, keep reading.

     

    Task: build a Telegram bot for task creation

    Our task was to allow users to create tasks in a Telegram chat that would be automatically passed into Bitrix24 CRM.

    Also, we needed to set up weekly reports on tasks that were in the In Progress and Completed statuses.

     

    How we configured the automation in Albato

    First, we made it possible to set up a task from Telegram in Bitrix24.

    Bundle 1. Monitoring of tasks in Telegram chat

    image (1).png

    • Trigger: An incoming message in Telegram with a keyword filter, for example: 'Task' or 'Don't forget'.
    • The bot replies to the author: 'Username, is this a task?'.
    • The message text and chat ID are saved to Data Storage.

    Bundle 2. Task confirmation and creation in Bitrix24

    image (2).png

    • The new trigger is an incoming Telegram message with a filter on the confirmation word (for example, 'Yes').
    • The task text is retrieved from Data Storage.
    • JS code finds the executor (the mentioned user) in the message.
    • The Table Swap tool matches the executor with their ID in Bitrix24.
    • The bot sends a message to Telegram: 'Assigning a task to @... with the text: ...'.
    • A task is created in Bitrix24 for the required employee.

    Task creation is all set up. Now it’s time to create automated reports for these tasks.

    Bundle 1. Updating tasks in Bitrix24 → Writing to the table

    image (3).png

    • Trigger: Task change with In Progress or Completed statuses.
    • JS code defines the week number.
    • The Table Swap tool maps the executor ID to the name.
    • The task is saved to Google Sheets: Task ID, Executor ID, name, and week number.

    Bundle 2. Telegram “report” command → Automatic response

    image (4).png

    • Trigger: An incoming private message in Telegram with the word 'report'.
    • The user and their ID in Bitrix24 are defined.
    • JS code defines the current week number.
    • The user's tasks for the current week in In Progress and Completed statuses are retrieved from the Google Sheet.
    • The “String section gluing” tool is used to form a single message.
    • The bot sends a report to Telegram: first, the tasks in progress, then the completed ones.
     

    Result: Telegram bot that creates tasks directly in Bitrix24 CRM

    We’ve created an automation that allows tasks to be created directly in Telegram in just one step.

    The status reports are generated automatically and sent on command. This way, managers are always updated.

    Customer
    The integration increased the informativeness of the project management system and saved considerable time on reporting. Meetings are shorter and tasks are under control. The integration increased the informativeness of the project management system and saved considerable time on reporting. Meetings are shorter and tasks are under control.

    Technical nuances

    We used JS code to automatically detect the current week number and quickly link the mentions of users in the chat with their ID in Bitrix24.

    Also, we configured a filter on the type of chat so that the bot responds only to private messages.

     

    Instructions: How to set up the solution Telegram bot + Bitrix24 in Albato

    Now let’s see how you can use this automation in your projects.

    Step 1.

    image (5).png

    Follow the link to install the solution in Albato. Click Grant Access to add the template to your personal account.

    Step 2.

    Set up connections to services. Click Add Connection, then follow the instructions in the interface.

    image (7).png

    You also need to prepare an empty table in Google Sheets to save tasks there.

    Data Storage is needed to store any data and share it between connections.

    Create a connection and add variables:

    • Chat for chat ID;
    • Text for task text;
    • For whom for sender name.

    image (8).png

    Once all services are connected, click Next.

    image (9).png

    Step 3

    Configure the 'Task Setup in Bitrix24' binder. Go to the Task Setup in Bitrix24.

    In the Bitrix24 step, click on ⚙️ and specify the required values for the fields:

    • Task name;
    • By whom the task is created;
    • Any other fields you use.

    Step 4. Run and test

    After setting up the bundle, run the solution and test how the Telegram bot sets tasks and generates reports.

    image (10).png

    The installed solution will be available in the section:

    Solutions → My Installations.

     

    Summing up

    Now you know how to connect Telegram to Bitrix24 via Albato and set up tasks right inside the messenger.

    If you want to explore how else Albato can help you automate your routine tasks, check out these posts:

    Did this answer your question?