Notifications in Telegram via the Action block

Notifications in Telegram via the Action block

UA

US

RU

UA

US

RU

1. Introduction

Definition

Notifications in Telegram via the Action block is an automated mechanism for instantly alerting the manager about new subscribers or about subscribers passing through a specific tunnel block. It is used at the Manage stage of the customer lifecycle. When the Action block is triggered in a tunnel, the Leeloo.AI platform sends an HTTP POST request to the Telegram Bot API, and the manager instantly receives a message with the lead's contacts in a Telegram group or channel.

The mechanism works at the intersection of the Action block (the red block in the sales tunnel builder), the Telegram Bot API (an external service) and platform variables (subscriber name, phone, email). Notifications do not work without separate setup on both the Leeloo.AI and Telegram sides: you need a Telegram bot, its API token, the group's Chat ID, and a working link with the JSON message body.

The B2B operator (marketer, sales manager or business owner) configures the integration once — creates a bot via BotFather, sets up a Telegram group for the sales team, obtains the Chat ID, assembles the working link, and configures the Action block in the tunnel. After that, every manager on the team receives notifications automatically — without opening the platform.

The B2C client (subscriber) does not interact with the notification mechanism directly — they simply pass through the tunnel: subscribe via the LGT, reply in chat, book a consultation. However, every pass through the Action block becomes an event that triggers the platform to send a notification to the sales team in Telegram.

The Client's Card records the fact that the subscriber passed through the Action block as an event in their log. The Telegram notification is an external side-effect of that event, sent via an HTTP request outside the platform.

After reading this guide you will understand:

  • what the Action block is and how it is used to send external requests;

  • how to create a Telegram bot via BotFather and obtain the API token;

  • how to create a Telegram group, add the bot, and obtain the Chat ID;

  • how to build the working link and a JSON message template with platform variables;

  • how to connect the Action block in a tunnel to deliver instant notifications to the sales team.

Purpose

Notifications in Telegram via the Action block are a real-time awareness channel for the sales team for key events in the funnel. They remove the «open the platform — see the new lead» delay: instead of checking CRM or Chats every N minutes, the manager receives a push notification in Telegram at the moment of the event and reacts within seconds.

Manage — the manager receives a real-time Telegram notification when a new lead comes through the LGT and subscribes, when an existing client reaches the «Booked a consultation» block in the tunnel, or when they answer pre-sale questions. The manager opens the chat directly from the link in the notification and continues handling without delay. The job to be done — guarantee the fastest possible reaction of the sales team to lead actions and minimise the «cooling» of hot inquiries.

2. Setting up the integration

The integration is configured in 12 steps: preparing the Telegram bot (section 2.1), the Telegram group (sections 2.2 – 2.4), obtaining the Chat ID (sections 2.5 – 2.6), building the working link (section 2.7), and configuring the Action block in the tunnel (sections 2.8 – 2.12). All steps are sequential — do not skip any.

2.1. Creating a Telegram bot via BotFather

Go to the BotFather bot in Telegram and subscribe to it:

BotFather

Enter the command /newbot and press Enter.

Set the bot name — this will be displayed to Telegram users (example: botleeloo).

Set the username for the bot — it must end with _bot (example: leeloo199_bot).

Your bot is ready. Copy the API token — you will need it later.

Note: if you already have a bot, go to BotFather, enter /mybots, select the needed bot from the list and click API Token.

2.2. Creating a Telegram channel or group

In Telegram, create a new group or channel that the sales team will use to receive notifications about leads.

2.3. Adding the bot to the group

Add the bot you created in step 2.1 as a member of the group — without this, the bot cannot send messages.

2.4. Public group mode and name

In the group settings, temporarily change the type to Public and set a Latin-letter name without spaces. Public mode is needed only for step 2.5 to obtain the Chat ID — after that, return the group to private mode.

2.5. Obtaining the group Chat ID

Build the link using the template below, replacing the uppercase placeholders:

https://api.telegram.org/botYOUR_BOT_TOKEN/sendmessage?chat_id=@YOUR_GROUP_NAME&text=hello

Paste the completed link into your browser's address bar and press Enter. On the page that opens, find "chat": {"id": and copy the number after it (including the «–» sign).

2.6. Returning the group to private mode

Return to the group settings and change the type from Public back to Private — to protect subscriber contact data.

2.7. Building the working link

Build the final link for sending messages:

https://api.telegram.org/botYOUR_BOT_TOKEN/sendmessage?chat_id=CHAT_ID

Replace YOUR_BOT_TOKEN with the API token from step 2.1, and CHAT_ID with the identifier copied in step 2.5.

2.8. Opening the Action block in a tunnel

Go to your tunnel, right-click on an empty area and create an Action block (red). Open it, click «Add» and select «Send external request» from the list.

2.9. Selecting the POST method

In the external request settings, select POST as the HTTP method — this is how the Telegram Bot API accepts data.

2.10. Request URL

Paste the working link from step 2.7 into the URL field.

2.11. JSON in the Body field

In the Body section, enter a JSON script according to your needs. You can include any platform variables:

{ "text": "🎯 New subscriber: {name}\n🔹 Tel.: {phone}\n🔹 Chat: https://app.leeloo.ai/chats/all/PersonID/ID/" }

2.12. Connecting the block and configuring variables

Replace the template values with the platform variables you need. Connect the block to an LGT — to receive notifications about new subscribers, or to any tunnel block to track a specific subscriber step (for example, booked a consultation, completed a survey).

Done! From now on, every time a subscriber passes through the connected block, you will receive a Telegram message with their contact details and a link to the chat.

The integration is configured once and works automatically. If the team changes — add new members to the Telegram group; you don't need to reconfigure the bot or the Action block.

2.13. Video guide

Related guides

Guide

Purpose

Guide

Purpose

Setting up notifications

Email notifications and notification panel setup in Leeloo.AI.

Key terms

Term

Definition

Term

Definition

Notifications in Telegram via the Action block

An automated mechanism for alerting the sales team in Telegram about events in tunnels. Works at the intersection of the Action block, the Telegram Bot API, and platform variables.

Action block

The red block in the sales tunnel builder that performs actions — including sending external HTTP requests.

BotFather

The official Telegram bot for creating and managing bots.

API token

The bot's unique key for accessing the Telegram Bot API.

Chat ID

The unique numeric identifier of a Telegram group or channel. For groups it starts with a «–» sign.

Send external request

An action in the Action block that sends an HTTP request to a specified URL with subscriber data.

Platform variables

Placeholders in the JSON request body such as {name}, {phone}, {email}, which are substituted with the subscriber's actual data when the block fires.

Client's Card

The customer card in Leeloo.AI, where the event of passing through the Action block is recorded.

Sales Tunnel

A sequence of blocks that a subscriber passes through.

Telegram Bot API

The Telegram HTTP API for sending messages through a bot.