Skip to content
Proud to collaborate with Microsoft for Startups

telegram.message.send-api ​

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.

Call Telegram sendMessage for a bot identified by bot_uuid.

PENDING (auto_advance=execute) → COMPLETED with message metadata ↘ FAILED on any error

Single-responsibility: one API call, no DB writes. The wrapping DAG (telegram.message.send) is responsible for resolving the chat, persisting the message, and composing the result.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the TelegramBot row whose token will be used to send the message. The workflow resolves bot_uuid → bot_token internally.
chat_refintegerYes—Telegram integer chat reference. Negative for groups/channels (e.g. -100123456), positive for private chats.
textstringYes—Message text to send.
parse_modestringNo—Optional Telegram parse mode passed through to sendMessage. 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 reference from the sendMessage response.
chat_refintegerYes—Telegram integer chat reference the message was sent to (echo of input).
chat_typestringYes—Chat type from the response ('private', 'group', 'supergroup', 'channel').
chat_titlestringNo—Chat title from the response; None for private chats.
chat_usernamestringNo—Chat @username from the response; None when not set.
dateintegerYes—Telegram unix timestamp (int) for when the message was sent.
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—executeSend message via Telegram Bot API
completedNoYesYes—Message sent; metadata captured
failedNoYesNo—Message send failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "telegram.message.send-api",
  "initial_data": {
    "bot_uuid": "value",
    "chat_ref": 123,
    "text": "value"
  }
}