Telegram ​
| Workflow | Type | Description |
|---|---|---|
| telegram.bot.enable-webhook | Dag | Register a public HTTPS URL as the Telegram webhook and persist the webhook config (URL + secret_token) on the TelegramBot row (bot_uuid, webhook_url, previous_webhook_url, ok) |
| telegram.bot.get-webhook-info | Atomic | Read a bot's current webhook configuration via Telegram Bot API (getWebhookInfo). Pure read — no DB writes, no message transmission. Input takes bot_uuid; the token is resolved from the TelegramBot row internally. |
| telegram.bot.register | Dag | Validate a Telegram bot token and persist the bot record (bot_uuid, bot_ref, username, persisted, restored) |
| telegram.bot.set-webhook | Atomic | Register a public HTTPS URL as the Telegram webhook for a bot identified by bot_uuid, or pass webhook_url='' to clear Telegram's current webhook. Wraps a single setWebhook API call; no DB writes. The bot token is resolved from the TelegramBot row internally. |
| telegram.bot.validate-token | Atomic | Validate a Telegram bot token via getMe and return bot metadata (bot_ref, username, first_name, is_bot) |
| telegram.callback.answer-api | Atomic | Acknowledge a Telegram inline keyboard button press via answerCallbackQuery. Input takes bot_uuid; the token is resolved from the TelegramBot row internally. Without this call, the user's client shows a loading spinner indefinitely. |
| telegram.message.delete-api | Atomic | Delete a message via Telegram Bot API (deleteMessage) and return whether it succeeded. Input takes bot_uuid; the token is resolved from the TelegramBot row internally. |
| telegram.message.edit-api | Atomic | Edit a message's text via Telegram Bot API (editMessageText) and return the edited message metadata. Input takes bot_uuid; the token is resolved from the TelegramBot row internally. |
| telegram.message.send | Dag | Send a Telegram message end-to-end: call Telegram sendMessage, upsert the chat row, and persist the outbound message record. Returns message_uuid, chat_uuid, and telegram_message_ref. |
| telegram.message.send-api | Atomic | Send a message via Telegram Bot API (sendMessage) and return message metadata. Input takes bot_uuid; the token is resolved from the TelegramBot row internally. |
| telegram.message.send-photo | Dag | Send a Telegram photo end-to-end: call Telegram sendPhoto, upsert the chat row, and persist the outbound message record. Returns message_uuid, chat_uuid, telegram_message_ref, and photo_file_ref. |
| telegram.message.send-photo-api | Atomic | Send a photo via Telegram Bot API (sendPhoto) and return message metadata. Input takes bot_uuid; the token is resolved from the TelegramBot row internally. |
| telegram.update.dispatch | Atomic | Process one inbound Telegram Update payload received via webhook. Persists the event idempotently via data.telegram.update-event.persist and inline-acknowledges any callback_query so the user's Telegram client stops showing the loading spinner. Ack failure does not fail the workflow — callback_acked=False is returned instead. |
| telegram.update.poll | Atomic | Pull a batch of pending Telegram updates via getUpdates and idempotently persist each one as a TelegramWebhookEvent row via data.telegram.update-event.persist. Returns persisted event_uuids, batch counts, and the next_offset to pass on the following call. |
