Connect an agent to a Telegram or Bale bot

Open in Agentum

Purpose

At eleven at night a customer still wants to know if the oven comes in black, and Neda has long gone home. Give the support assistant its own Telegram or Bale bot, so anyone can talk to it directly, day or night.

Before you start

  • Save the agent first. Until it is saved, the "Channels" section says "Save this agent before connecting a bot."
  • Create a bot with @BotFather in Telegram, or @Bot_Father in Bale, and keep its token private.
  • Use a saved custom agent belonging to your current workspace, and have permission to manage agents.

Steps

  1. Open "Agents", find the agent under "My agents" and select it. In the window, open "Agent actions" (the three dots) and choose "Edit agent".
  2. Open "Channels" and choose the "Telegram" or "Bale" tab. The "Website" and "API" tabs are previews and cannot be used to connect this agent.
  3. Paste the public link of your bot into "Bot link" (the link people use to open it). Its username must match the token.
  4. Paste the token into "Bot token". It is encrypted and never shown again, so you enter it again whenever you reconnect.
  5. Optional: write a "Welcome message (/start)" of up to 1,000 characters. Leave it empty to greet each visitor with the default message in their own language.
  6. Decide on "Allow the agent’s selected plugin tools". When it is on, visitors of the bot can use the plugin tools chosen for this agent. Only tools you picked one by one with "Choose tools" in the agent's "Plugins" section count: a plugin left on "All tools enabled" gives visitors none of its tools. Every plugin tool call a visitor triggers still waits for your approval in Agentum, because a plugin's tools are never treated as read-only. If nobody approves within 2 minutes, the call fails. Turn it on only for tools that are safe for a public audience.
  7. Select "Connect bot". The status badge shows "Connecting", then "Connected". Open the bot and send a message to test it.
  8. To stop the bot, select "Disconnect". To change the link, token, welcome message or tools, edit them and select "Save and reconnect".

Expected result

The status is "Connected" and shows the bot's name and username, with a link to open it and the time of the "Last received update". Anyone who messages the bot can talk to the agent. Each visitor has a separate conversation history and memory, and the usage is charged to your workspace. This is separate from your own personal Agentum Telegram connection.

Troubleshooting

Problem What to do
"Connect bot" is disabled Fill in both "Bot link" and "Bot token".
An error says the link and token belong to different bots Use the link of the bot that issued the token.
An error says the token is not valid Copy the whole token from the bot manager again. It contains digits, a colon and letters.
"The bot could not be verified. Check its token and try again." Make sure the token belongs to a bot that still exists, copy it again from the bot manager and select "Connect bot" again.
An error says the bot is the platform's official bot Create your own bot. The official one cannot be connected to an individual agent.
An error says this bot or agent channel is already connected elsewhere Another workspace member connected this agent's channel, or the bot is connected to another agent. Disconnect it there first, or use a different bot.
The badge says "Connection issue" Read the message below it, fix the token or link, and select "Save and reconnect".
"Connected" but the bot does not answer The badge does not prove that messages are answered. Send a test message and check "Last received update".
The bot answers with a fixed message, or cannot be connected The workspace or project has Data Privacy Mode on, and Telegram and Bale bots are off there. See Use Data Privacy Mode.

Was this helpful?