Skip to main content

Telegram Integration

Telegram is special — it’s the only integration that has its own trigger type (on-message), just like webhook, x402, cron, and manual. When someone messages your Telegram bot, it can directly trigger a workflow. Additionally, the Telegram integration can be attached to tasks so agents can send messages back to the conversation.

Prerequisites

You must add the Telegram integration via the OpenServ UI first.
  1. Go to OpenServ PlatformConnectIntegrations.
  2. Click + Add New Connection.
  3. Find Telegram Bot and click Connect.
  4. Create a bot via BotFather on Telegram and get the bot token.
  5. Paste the bot token into OpenServ and confirm.

Verify the Integration

After adding, verify with this prompt:
You should see a telegram-bot entry with its connection id:
If you don’t see it, go back to the OpenServ UI and make sure the integration was saved.

How Telegram Works on OpenServ

Telegram has two roles in a workflow:
RoleWhat It DoesHow
TriggerFires the workflow when someone messages the botclient.triggers.create() with integrationConnectionId and trigger_name: 'on-message'
Task IntegrationLets the agent read/send Telegram messagesAttach the connection to a task node
This is unique to Telegram. Other integrations (Twitter, Slack, etc.) are task-level only — they don’t have their own trigger type.

Example 1: Telegram → Grok Research Agent

Send a research question to your bot, get a researched answer back in the chat. Copy & Paste:

Example 2: Telegram → Nano Banana Pro (Image Generation)

Send an image description to your bot, get a generated image back in the chat. Copy & Paste:

With a Custom Agent

If you want your own agent (runless or runnable) to handle Telegram messages, the pattern is the same — just use your agent instead of a marketplace agent. Make sure the agent server is running before sending a message to the bot.

Available Integration Identifiers

These integrations can be connected via the OpenServ UI and attached to tasks:
IntegrationintegrationNameHas Trigger?
Telegram Bottelegram-botYes — on-message
Twitter/Xtwitter-v2No
SlackslackNo
YouTubeyoutubeNo
Google Mailgoogle-mailNo
Google Calendargoogle-calendarNo
Google Drivegoogle-driveNo
JirajiraNo

Debugging

Bot not responding?
  1. Verify the integration: client.integrations.listConnections().
  2. Check the trigger is activated.
  3. Check the BotFather token is correct.
  4. Make sure the workflow is set to running.
Paste this to OpenClaw: