Home · Blog · One script for two messengers: adding MAX to the Telegram bot

One script for two messengers: adding MAX to the Telegram bot

· updated · Command CHBT · MAX, Telegram

The request “move the bot from Telegram to MAX” implies moving: packing things in one place, unpacking them in another. In CHBT you don’t need to do this, and this is not a marketing formulation, but the design of the product: one project holds several channels, and the script compiled for Telegram starts responding in MAX immediately after you inserted the token. You won't have to move anything other than attention. Below - what exactly is common, what will have to be corrected (buttons, individual texts, links), why the subscriber base does not move in any constructor and how to make a fork “in Telegram this way, in MAX otherwise” in one block.

Why is the word "transfer" not appropriate here?

In CHBT, a bot is a project, and Telegram and MAX are channels within it. The script, contacts, deals, operators belong to the project, not the channel. Therefore, “move the bot to MAX” in practice means “add a second channel to the project” - and everything that was collected for Telegram continues to work in the same place where it was.

Drives automaticallyDoesn't go and can't
Entire script: blocks, branches, triggers, variablesTelegram bot subscribers: they do not have an account “in your MAX bot” until they open it themselves
“Contacts” section with tags and fields - MAX contacts will simply be addedThe history of correspondence between a specific person from Telegram and his future conversation in MAX
CRM: kanban deals, stagesIdentifiers: one person in two messengers - two contact cards
“Conversations”: one inbox, filter by channelLinks like t.me and mentions of @name in texts - they will have to be rewritten or separated with a condition
AI agents and knowledge base, quick response templates, team of operatorsThe indicator “prints” - CHBT shows it only in Telegram

The right column is the same for any constructor and for your own development: messengers do not exchange subscribers, and the bot cannot write to a person who has not written to it. All you can do with the Telegram database is call it to MAX using the link. More on this at the end of the article.

If you are still choosing whether a second channel is needed at all, start with comparison MAX or Telegram for bot — there at the points where the platforms diverge.

Fifteen minutes: connect MAX with the second channel

Technically this is the shortest part.

  1. In your MAX for business account, create a bot and copy its token. It is better to make the name and avatar the same as the Telegram bot: clients will recognize it.
  2. In CHBT, open the desired project → “Channels” section → “Connect MAX”. Insert the token, optionally set the channel name (for example, “MAX - main”) and click “Connect”. The webhook address CHBT will be registered by itself.
  3. Open the bot in MAX and write something to it. If the script starts with a "Command /start" trigger, it will run: MAX sends a start event, and CHBT turns it into the same command.

If the bot is silent, first check the token and whether the script is enabled; there is a short checklist in MAX connection help. Step-by-step instructions “from scratch”, if you don’t have a Telegram bot yet, are in the article how to create a bot in MAX.

There is no separate plan for the channel: channels are included in any plan, including Free. The Free limit - 30 conversations per month - is considered per project, that is, for both channels together, and the same person who wrote in both Telegram and MAX means two contacts and two conversations. If the Telegram bot is already close to the limit, the second channel will exhaust it faster - take this into account when planning.

Running a script in MAX: what you usually have to edit

The flow works — but it was built for Telegram, and small issues show up in MAX that only the client will notice. Go through the whole bot with “Check flow” in the editor, and then in real MAX on a phone. Here's what most often needs fixing.

  • Texts that mention Telegram. “Tap /start”, “message our bot @company_bot”, “forward to a friend” — in MAX these either don't work or sound odd. The editor has no search across block texts, so go through the “Message” blocks in order (or run the flow through “Check flow” and read the bot's replies) and either rewrite such phrases neutrally (“tap the button below”) or split them with a condition — that's the next section.
  • t.me links. An “Our channel” button linking to a Telegram channel will take a MAX client to another messenger. Decide whether you want that. If you have a channel in MAX, the link should depend on the channel the client came from.
  • Long button labels. In MAX buttons go one per row, as in Telegram, so the menu carries over without changes. But “Book a free consultation” reads worse on a phone than “Book”: keep labels to 20–25 characters — “Book”, “Prices”, “Operator”. This improves both versions.
  • Relying on “typing”. If in Telegram you split a long message into parts, counting on the typing indicator to create a rhythm, in MAX the parts will arrive one after another with no pauses. Either merge them or put a 2–3 second “Pause” between them: it works in both channels.
  • Attachments. CHBT doesn't send files and images in Telegram and MAX — only in the website widget. If the flow was once built around “we'll send you a PDF”, both channels should get a link.

None of these points requires duplicating the flow. Edits are made in the same blocks, and they don't break the Telegram version.

Fork along the channel: block “Condition” → “Channel”

When neutral wording is not enough - for example, the “Our Telegram channel” button is needed only by people from Telegram, but you want to show “Our channel in MAX” to MAX clients - use the “Condition” block with the “Channel” field. It checks where the current conversation came from and starts a “yes” or “else” thread.

Example for greeting:

  1. Trigger “Command /start” → block “Condition”: field “Channel”, operator “equals”, value “MAX”.
  2. Thread “yes” → “Message”: “Hello! You are in the MAX-bot studio. Select what you need" + buttons "Sign up", "Prices", "Our channel in MAX".
  3. Thread “otherwise” → “Message” with the same meaning, but with a button “Our Telegram channel”.
  4. Both branches converge into one service selection block - then the flow is general.

Three rules to prevent forks from turning the script into two parallel copies:

  • A fork is an exception, not the norm. Place a “Condition” on a channel only where the text or button objectively depends on the messenger. This usually includes a greeting, links to your channels, and a final “how to contact us.”
  • Get back together. After channel messages, branches must return to a common block. If after a fork there are ten identical blocks in two branches, you are duplicating, and after a month the edits in one branch will be forgotten in the other.
  • The big differences are in Substream. If MAX requires a whole separate piece (say, another set of services), put it in a nested script with a “Substream” block - this way the main canvas will remain readable.

How conditions are structured in general—operators, several rules, an “otherwise” branch—is described in help on conditions and branches. The channel condition can be combined with tags and variables: “the MAX channel is the tag vip" is a separate thread.

What is common immediately and without setup

After connecting the second channel, there is no need to “connect” anything additional - this is the point of the project as a unit.

  • "Conversations". One inbox: correspondence from Telegram and MAX in one list, there is a filter by channel and tabs by status: “All”, “Waiting for a response”, “At the bot”, “AI”, “Closed”. The operator responds to the MAX client from the same screen as to the Telegram client; The “Operator” block in the script works the same way.
  • "Contacts". General section, each card has a channel indicated. Filter by tags and export to CSV - across the entire database; the channel is indicated in the upload column.
  • CRM. Kanban of transactions is one; The “Deal in CRM” action in the script creates a deal regardless of the channel.
  • AI agent. One agent with one knowledge base responds in both channels - on the Basic plan and above. There is no need to set it up twice, the credits are shared.
  • Team. Roles Owner / Administrator / Operator and invitations by e-mail are for the project, not for the channel.
  • "Analytics". The “By Channels” block shows conversations for 30 days separately on Telegram and MAX - this way you will see whether MAX justified the connection.
  • Mailings. One section; The message goes to each contact in the channel from which it came. The audience is selected by tags, not by the messenger.

If you have external links via an “HTTP request”, a field with the channel type comes in the body of the request - your server or script in Make/n8n can distinguish between sources without additional settings.

What does not merge: two messengers - two cards

The main limitation, due to which the “transfer” is not complete, lies on the side of messengers. A person's Telegram ID and his MAX ID are not connected in any way. If Anna wrote to your Telegram bot, and then opened a MAX bot, there will be two Annas in “Contacts”: one with a Telegram channel, the other with a MAX channel. They have separate tags, conversation history and transactions.

How to live with it:

  • Pack your phone. The “Data Collection” block checks the “Phone” format in both channels - and you have a common key. In Contacts themselves, the cards will not be automatically combined, but when exporting CSV, duplicates by number are found in any table within a minute.
  • Do not send the same thing to both channels at once “to everyone.” Anyone who is in both databases will receive the message twice. Distribution using a tag placed in a specific channel (for example, tg subscriber), solves the problem.
  • Remember where the operator's response goes. The client wrote to MAX - you need to respond to his MAX conversation, even if the Telegram card has the same last name. The inbox will not allow you to make a mistake, but with manual reconciliations using CSV it is easy to confuse this.

If it’s important for you to understand which broadcasts and tags work in which channel, you should think about the markup in advance - there’s an article about this tags as a segmentation system.

How to invite Telegram bot subscribers to MAX

If the task is not “add a channel,” but rather “transfer people,” the only honest way is to invite them to open a MAX bot themselves. This is done by the same mailing as everything else (Basic plan and higher).

  1. Take the link to the MAX bot from the MAX for business account and add a starting parameter to it, for example from_tg. In the script, create a “Deep Link” trigger with this payload → “Add tag” action from-telegram → short greeting: “You came from Telegram - everything is the same here, posts and notifications will now come here.”
  2. In the “Mailouts” section, collect text for the Telegram audience. There are no buttons in the broadcasts - put the link in text, one at the end: “We are now in MAX: link. There are also recording statuses and reminders.” Audience - the tag of your Telegram subscribers; delayed launch - on a working morning.
  3. After a week, look in “Contacts” to see how many contacts have the tag from-telegram appeared. Not the entire base will transfer - and this is a normal result, not a failure: the rest will remain in Telegram, and the bot will continue to work there.

What you shouldn’t do: disable the Telegram channel “so that everyone switches over.” People don't go out of compulsion - they stop writing. Both channels can live in parallel for years; CHBT doesn’t charge extra money for this, and you still have one script. If the audience comes to you from external sources - for example, from social networks - the mechanics of overflow are described separately in the article about transfer of subscribers to Telegram and MAX.

When can a Telegram channel be disabled and what not to do?

Sometimes the move is still real: the customer requires only a Russian platform, or almost the entire base is already in MAX. Criteria under which shutting down a Telegram channel will not affect clients:

  • in “Analytics”, in the “By Channels” block, there are almost no conversations from Telegram for 30 days - and so on for several months in a row;
  • active conversations with the operator in Telegram are closed, there are no waiting people in the “Conversations” by the channel filter;
  • the “we are now in MAX” mailing went out at least twice with an interval of 2–3 weeks;
  • The link to the Telegram bot has been removed from the website, from letters and from printed materials.

Procedure: first, put a short message in the script for Telegram via “Condition” → “Channel”: “The Telegram bot terminates on such and such a date, all the same in MAX: link.” After two weeks, stop the channel. There is an important caveat here: there is no “turn off” button for the channel in CHBT, the channel can only be deleted in “Channels”. Correspondence of the deleted channel will remain in “Conversations” for read only: open conversations will be closed and you will no longer be able to respond. The cards remain in “Contacts” - they are tied to the project and to people’s Telegram IDs - but there will be nowhere to write to them from Telegram. To be on the safe side before deleting, still upload “Contacts” to CSV: the upload has a channel column, phone numbers and tags will remain in your table. If you don’t want to delete, there is a soft option: leave the channel connected, and in the flow, through “Condition” → “Channel”, respond to Telegram clients with one message with a link to MAX - the bot formally works, but leads people to a new channel.

And the last thing: do not delete the Telegram bot from @BotFather right away. The bot's name may be taken, and if you decide to return after six months, you will not be able to restore it. Let him be silent - it costs nothing.

Checklist: MAX is connected correctly

  1. In “Channels” there are two channels with the status “Working”; test message in MAX runs the same script as /start on Telegram.
  2. The “Message” blocks have been passed through in order, phrases about /start, @name and t.me links have been corrected - or separated by a condition by channel.
  3. Button labels have been shortened; The entire flow was completed in real MAX from the phone, and not just in the test chat.
  4. There are forks along the channel only where the texts are truly different, and after them the branches converge into a common block.
  5. In both channels, a telephone number is collected - a common key for checking the database.
  6. Deep link for transition from Telegram puts a tag from-telegram; Distribution is scheduled for business morning.
  7. The conversation limit has been recalculated for two channels: on the Free plan it is 30 per month per project.

Result: connecting MAX to an existing Telegram bot in CHBT is a token, running a script and several edits in the texts. No second project, no second script, no second payment. Open the account and add the MAX channel →

More on the blog