Telegram
Connic handles the Telegram Bot API directly. User messages trigger an agent that replies in-thread; outbound runs push reports and alerts to any chat or channel. No bot framework to host.
Overview
After the bot is created once with @BotFather, Connic handles the rest. An inbound Telegram connector uses the bot token to register a webhook with Telegram, so messages, edited messages, and callback queries arrive as HTTP POSTs, get verified, and trigger the linked agents with a structured payload: the text, the chat_id, sender details, and the raw update. An outbound connector closes the loop, sending agent output back into any chat via sendMessage.
That removes the separate bot process: no long-polling service, no bot framework to host, and no webhook plumbing. The bot's brain is a Connic agent, which means its conversations appear as inspectable runs and its behavior updates when the agent is redeployed, not the bot.
How it works
Create a bot with @BotFather
Message @BotFather on Telegram, send /newbot, follow the prompts, and copy the bot token.
Create the connector
Paste the bot token into a new Telegram connector. In inbound mode, Connic validates the token and registers the webhook with Telegram automatically; access can optionally be restricted to a list of allowed Telegram user IDs.
Link an agent
Every message to the bot now triggers the linked agent with the message payload as input. To reply in the chat, add an outbound connector and have the agent return the chat_id with its response text.
Production patterns
Patterns teams ship in production, with Connic running the queues, workers, and schedulers.
User sends message
messageAgent reads the question, searches the connected help docs, and replies in the same chat in seconds, keeping the thread, tone, and typing indicator natural.
User sends message
messageAgent reads the question, searches the connected help docs, and replies in the same chat in seconds, keeping the thread, tone, and typing indicator natural.
Scheduled or event-driven run
agent_completedAgent reviews the latest metrics, writes a one-paragraph summary of what changed and why it matters, and posts it to the on-call channel with a recommended next step.
Scheduled or event-driven run
agent_completedAgent reviews the latest metrics, writes a one-paragraph summary of what changed and why it matters, and posts it to the on-call channel with a recommended next step.
Cron schedule fires
cronAgent pulls revenue, signups, and active users, writes a three-bullet summary with the day's biggest movers, and posts it to the team chat at 9am.
Cron schedule fires
cronAgent pulls revenue, signups, and active users, writes a three-bullet summary with the day's biggest movers, and posts it to the team chat at 9am.
Critical event detected
agent_completedAgent reads the alert, identifies the owner from the on-call rotation, and pings them directly with a one-line summary and the runbook link.
Critical event detected
agent_completedAgent reads the alert, identifies the owner from the on-call rotation, and pings them directly with a one-line summary and the runbook link.
Authentication and access control
The connector uses Telegram's built-in secret_token mechanism: a random token generated at creation is registered with Telegram via setWebhook, and every incoming request must carry it in the X-Telegram-Bot-Api-Secret-Token header. Requests are rate limited, the bot token is stored encrypted, and an optional allowlist of Telegram user IDs keeps a bot private even though anyone can find it. Deleting the connector unregisters the webhook.
Every message becomes a normal agent run, with full traces, token and cost tracking, and the same guardrails and approval rules as any other trigger, so a chat interface doesn't mean giving up oversight.
Replying and message formats
Inbound, the agent gets the most useful fields at the top level: text, chat_id, and a message object with sender details, plus the raw Telegram Update for anything else. Outbound, the agent returns JSON with a text field and optionally a chat_id; a bare string works too and goes to the connector's default chat ID. The chat_id from the agent's output wins over the connector default, which is how a reply reaches the user who wrote in. Messages are sent with parse_mode: HTML, so the agent can format its answers. See the full payload and output formats in the Telegram docs.
Information
- Publisher
- By Connic
- Connectors
- Connectors
- Modes
- Inbound, Outbound
- Documentation
- Telegram docs
Frequently Asked Questions
chat_id. Link the same agent to an outbound Telegram connector and have it return JSON with that chat_id and a text field; the connector sends the reply into the same chat via sendMessage. For fixed destinations like an alerts channel, set a default chat ID on the connector instead.message.from_id from the run payload.Bring the event source, payload shape, result destination, and any private-network or approval requirements. We will map Telegram to the right Connic connector mode, deployment path, and observability setup.
Talk to SalesMore connectors
Browse the marketplaceMCP Server
Expose agents as MCP tools
Telnyx Voice
Answer calls on your Telnyx number with a voice agent
Email (SMTP/IMAP)
Read inboxes, send replies
Cron Scheduler
Run an agent on a cron expression
Twilio Messaging
Receive and send SMS, WhatsApp, and RCS messages
Twilio Voice
Answer incoming calls with a voice agent