Appearance
Telegram
The Telegram integration is built around the POST /api/integrations/telegram/webhook endpoint and the queue/runtime pipeline behind it.
Setup
- Provision Cloudflare resources and apply migrations.
- Set
TELEGRAM_BOT_TOKENon the API Worker and runtime Worker. - Set
TELEGRAM_WEBHOOK_SECRETon the API Worker. - Seed a Telegram chat binding.
- Register the webhook URL with Telegram.
Recommended commands:
bash
pnpm telegram:seed:staging
pnpm telegram:webhook:staging
pnpm cf:deploy:stagingSupported commands
The bot currently recognizes:
/start/help/status/run <text>
It also accepts normal text messages in the bound chat.
Reminder parsing
Plain text can become a direct reminder task or schedule.
Examples:
remind me in 30 minutes to stretchremind me tomorrow at 9am to review runsremind me next monday at 10am to check approvalsremind me every weekday at 8am to plan the dayremind me every week on friday at 5pm to send the reportremind me every month on 1st at 9am to reconcile usage
Runtime behavior
- Telegram webhook payloads are normalized before they enter the queue.
- Bound chats can create tasks, schedules, or agent-backed tasks depending on the message.
- Quick acknowledgements are used when a response would otherwise take longer.
- Outbound Telegram replies are logged in the messaging table.
- Long replies are edited in place when possible and truncated to Telegram’s message limit.
Unbound chats
If Telegram sends a message from a chat that is not bound to the workspace, the webhook logs the chat as unbound and responds with a fallback message that reveals the chat id for seeding.