Skip to content
Proud to collaborate with Microsoft for Startups

telegram.message.send ​

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.

End-to-end send a Telegram message: call Telegram API, upsert chat row, persist outbound message record.

Public callers supply bot_uuid + chat_ref + text; the DAG resolves the token internally (via send-api) and returns message_uuid + chat_uuid as the platform-side identifiers.

Overview ​

PropertyValue
Workflow typeDag
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the TelegramBot row. The bot token is resolved internally by the send-api step.
chat_refintegerYes—Telegram integer chat id. Negative for groups/channels (e.g. -100123456), positive for private chats.
textstringYes—Message text to send.
parse_modestringNo—Optional Telegram parse mode. Accepted values: 'MarkdownV2', 'HTML', 'Markdown'.
reply_markupjsonNo—Optional Telegram reply_markup as a raw dict, e.g. {'inline_keyboard': [[{'text': 'OK', 'callback_data': 'ok'}]]}. Threaded through to telegram.message.send-api.
workflow_run_uuidstringNo—Engine-stamped parent run uuid (DAG step target).

Output Schema ​

FieldTypeRequiredDefaultDescription
message_uuiduuidNo—UUID of the persisted TelegramMessage row (from Layer 3).
telegram_message_refintegerNo—Telegram's integer message id (from Layer 1).
chat_uuiduuidNo—UUID of the upserted TelegramChat row (from Layer 2).
persisted_chatbooleanNo—True when the chat row was newly inserted (alias of Layer 2 'persisted').
send_messagejsonNo—Result dict from the send_message step (Layer 1).
upsert_chatjsonNo—Result dict from the upsert_chat step (Layer 2).
persist_messagejsonNo—Result dict from the persist_message step (Layer 3).
bot_uuiduuidNo—Echoed from input.
chat_refintegerNo—Echoed from input.
textstringNo—Echoed from input.
parse_modestringNo—Echoed from input.
workflow_run_uuidstringNo—DAG run uuid; stamped by the engine's auto-generated 'start' transition.
completed_atstringNo——
failed_atstringNo——
failure_reasonstringNo—Engine-stamped human-readable failure reason
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerintegerNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name

DAG Layers ​

#LayerStepsCompensation
1sendtelegram.message.send-api—
2upsert_chatdata.telegram.chat.upsert—
3persist_messagedata.telegram.message.persist—

Execution Flow ​

Sub-workflows ​

Sub-workflowStep name
telegram.message.send-apisend_message
data.telegram.chat.upsertupsert_chat
data.telegram.message.persistpersist_message

API Usage ​

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

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