Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the TelegramBot row whose token will be used to edit the message. The workflow resolves bot_uuid → bot_token internally.
chat_refintegerYes—Telegram integer chat reference the message lives in. Negative for groups/channels (e.g. -100123456), positive for private chats.
message_refintegerYes—Telegram integer message id to edit (message_id from the send response).
textstringYes—New message text.
parse_modestringNo—Optional Telegram parse mode passed through to editMessageText. Accepted values: 'MarkdownV2', 'HTML', 'Markdown'.
reply_markupjsonNo—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_idstringNo—Engine-stamped parent run id (DAG step target)

Output Schema ​

FieldTypeRequiredDefaultDescription
telegram_message_refintegerYes—Telegram's integer message id of the edited message.
chat_refintegerYes—Telegram integer chat reference the message lives in (echo of input).
textstringNo—The edited message text as returned by Telegram.
edit_dateintegerNo—Telegram unix timestamp (int) of the edit; None if not surfaced.
failure_reasonstringNo—Engine-stamped human-readable failure reason
failure_typestringNo—Engine-stamped failure category
failed_actionstringNo—Engine-stamped action that raised
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerstringNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeEdit message via Telegram Bot API
completedNoYesYes—Message edited; metadata captured
failedNoYesNo—Message edit failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

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"
  }
}