Telegram Integration

Deploy your AI agent to Telegram groups for automated conversations

Telegram Integration#

Connect your AI agent to Telegram groups to handle conversations automatically. AlonChat uses a shared bot, so there is no need to create your own bot with BotFather.

Where to find it: Telegram connects under AI Assistant > Channels (the Channels tab), not the Deploy page.


Setting Up#

Step 1: Add a Telegram Group#

  1. Go to your agent dashboard
  2. Navigate to AI Assistant > Channels
  3. Click Add Telegram Group
  4. Give the group a label (e.g., "Customer Support Group")

After creating the group:

  1. A link code is generated
  2. Copy the link code
  3. Follow the on-screen instructions to add the AlonChat bot to your Telegram group

Step 3: Add the Bot to Your Group#

  1. Open your Telegram group
  2. Add @AlonChatBot as a member
  3. The bot will automatically detect the group and verify the link code
  4. Auto-polling checks every 5 seconds for verification

Step 4: Verify Connection#

Once the bot is added and detected:

  • The group status changes to "Verified"
  • The channel is auto-enabled
  • Your agent starts responding to messages in the group

How It Works#

Shared Bot Model#

AlonChat uses a shared bot (@AlonChatBot) for all Telegram integrations. This means:

  • No BotFather setup required -- You do not need to create or manage your own Telegram bot
  • Automatic message routing -- The shared bot routes messages to the correct agent based on which group they come from
  • Dedicated bot option -- If you have configured a dedicated bot token in your agent settings, it takes priority over the shared bot

The shared bot approach simplifies setup significantly. You just add @AlonChatBot to your group and link it with a code -- no API tokens or webhook configuration needed on your end.

Message Flow#

Code
User sends message in Telegram group
          |
@AlonChatBot receives the message
          |
Message is routed to the correct AlonChat agent
          |
Agent processes message (RAG retrieval)
          |
Agent generates response using AI model
          |
Response is posted in the Telegram group

Features#

FeatureStatus
Text messagesSupported
Auto-replySupported
Human handoffSupported
Conversation historyTracked
Lead captureSupported
Multiple groupsSupported
Team alert channelsSupported

Telegram as a Team Alerts Channel#

In addition to customer-facing groups, Telegram can be used as a team alerts channel -- an internal group where your team receives notifications, reviews AI activity, and replies back to customers from one place.

Setting Up Team Alerts#

  1. In AI Assistant > Channels, click Add Team Alerts
  2. A link code is generated
  3. Create a new Telegram group, add @AlonChatBot, and send /link <code> in the group
  4. The group is verified and added to your team alert channels

What Team Alert Channels Are Used For#

  • Custom Triggers can send notifications to a team alert channel
  • Team members can review customer conversations and reply from inside Telegram
  • Alerts include context, customer details, and AI reasoning

Roles Inside a Team Alert Group#

Each member of a team alert group is assigned a role:

RoleWhat they can do
View OnlyRead alerts only
Reply OnlyRead alerts and reply to customers
Channel LeadRead, reply, and approve payments or escalated actions
Channel AdminFull control, including managing other members

Roles are managed from the team alerts section of the Telegram Channels page.


Bot Commands#

Telegram users can use these commands in the group:

CommandDescription
/startStart a conversation with the agent
/helpDisplay help information and available commands
/humanRequest to speak with a human agent

These commands work alongside natural language -- users can also just type their questions directly.


Managing Groups#

Multiple Groups#

You can connect multiple Telegram groups to a single agent:

  • Click Add Telegram Group for each new group
  • Each group gets its own link code and settings
  • Manage all groups from AI Assistant > Channels

Group Actions#

  • Copy link code: Share with group admins
  • Regenerate link code: If the code expires or is compromised
  • Delete group: Remove with confirmation dialog
  • Test message: Send a test message to verify the bot is working

Best Practices#

1. Set a Clear Group Description#

Let group members know there is an AI assistant:

"This group is powered by [Company Name]'s AI assistant. Ask questions anytime and get instant answers."

2. Test Before Going Public#

Before sharing the group link:

  • Send several test messages covering common questions
  • Verify the agent responds accurately
  • Test the /human command to make sure handoff works
  • Check that conversations appear in your AlonChat dashboard

3. Monitor Conversations#

Check your AlonChat dashboard regularly:

  • Review AI responses for accuracy
  • Look for unanswered or poorly answered questions
  • Add missing information to your sources

4. Use Multiple Groups for Different Topics#

Organize by purpose:

  • "Sales Questions" -- product inquiries and pricing
  • "Customer Support" -- troubleshooting and account help
  • "General Info" -- business hours, locations, FAQs

For security, regenerate link codes if:

  • A group admin leaves your organization
  • The code was shared publicly by mistake
  • You suspect unauthorized access

Troubleshooting#

Bot Not Responding in Group#

Check these in order:

  1. Bot is a group member:

    • Open the group in Telegram
    • Check the member list for @AlonChatBot
    • If missing, add it again
  2. Group is verified:

    • Go to AI Assistant > Channels in AlonChat
    • Check that the group status shows "Verified"
    • If not verified, the link code may not have been detected -- try regenerating it
  3. Auto-reply is enabled:

    • Check the toggle for the specific group
    • Ensure it is turned on
  4. Agent is trained:

    • Go to Sources
    • Ensure the agent has been trained with content

Group Shows "Not Verified"#

Causes:

  • @AlonChatBot was not added to the group
  • The link code expired or was entered incorrectly
  • The bot was removed from the group

Fix:

  1. Regenerate the link code from AI Assistant > Channels
  2. Re-add @AlonChatBot to the Telegram group
  3. Wait for auto-detection (polls every 5 seconds)

Bot Responds to Every Message#

If the bot is responding to messages it should not:

  • Review your agent's system prompt for specificity
  • Add instructions like "Only respond to questions directed at you or relevant to [topic]"
  • Consider using the /start command model where users must initiate

Slow Responses#

Possible causes:

  1. AI model speed -- Switch to a faster model in Settings > AI
  2. Large source library -- Optimize by removing duplicate content
  3. Telegram API delays -- Occasional, usually resolves on its own

Privacy and Security#

  • Messages processed by AlonChat are encrypted in transit and at rest
  • AlonChat only accesses messages in groups where @AlonChatBot is a member
  • No access to private messages between Telegram users
  • You can disconnect any group at any time
  • Conversation data can be deleted on request

Next Steps#