telegram.message.edit-api
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.
Call Telegram editMessageText for a bot identified by bot_uuid.
PENDING (auto_advance=execute) → COMPLETED with edited message metadata ↘ FAILED on any error
Single-responsibility: one API call, no DB writes.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-telegram |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
bot_uuid | uuid | Yes | — | UUID of the TelegramBot row whose token will be used to edit the message. The workflow resolves bot_uuid → bot_token internally. |
chat_ref | integer | Yes | — | Telegram integer chat reference the message lives in. Negative for groups/channels (e.g. -100123456), positive for private chats. |
message_ref | integer | Yes | — | Telegram integer message id to edit (message_id from the send response). |
text | string | Yes | — | New message text. |
parse_mode | string | No | — | Optional Telegram parse mode passed through to editMessageText. Accepted values: 'MarkdownV2', 'HTML', 'Markdown'. |
reply_markup | json | No | — | Optional Telegram reply_markup as a raw dict, e.g. {'inline_keyboard': [[{'text': 'OK', 'callback_data': 'ok'}]]}. Each inner button dict is passed as kwargs to InlineKeyboardButton. |
workflow_run_id | string | No | — | Engine-stamped parent run id (DAG step target) |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
telegram_message_ref | integer | Yes | — | Telegram's integer message id of the edited message. |
chat_ref | integer | Yes | — | Telegram integer chat reference the message lives in (echo of input). |
text | string | No | — | The edited message text as returned by Telegram. |
edit_date | integer | No | — | Telegram unix timestamp (int) of the edit; None if not surfaced. |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failure_type | string | No | — | Engine-stamped failure category |
failed_action | string | No | — | Engine-stamped action that raised |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | string | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Edit message via Telegram Bot API |
completed | No | Yes | Yes | — | Message edited; metadata captured |
failed | No | Yes | No | — | Message edit failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "telegram.message.edit-api",
"initial_data": {
"bot_uuid": "value",
"chat_ref": 123,
"message_ref": 123,
"text": "value"
}
}