Skip to content
Proud to collaborate with Microsoft for Startups

telegram.message.send-photo ​

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.

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

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

The photo caption is stored in the TelegramMessage text column (v1 trade-off — no media columns yet). The photo URL is not persisted; photo_file_ref is returned so callers can re-send without re-uploading.

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-photo-api step.
chat_refintegerYes—Telegram integer chat id. Negative for groups/channels (e.g. -100123456), positive for private chats.
photostringYes—Photo to send: HTTPS URL of the image or a Telegram file_id from a previously uploaded photo.
captionstringNo—Optional caption text (up to 1024 characters). Stored as the TelegramMessage text in v1 (no dedicated media columns).
parse_modestringNo—Optional Telegram parse mode for the caption. 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-photo-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).
photo_file_refstringNo—Telegram file_id of the uploaded photo (from Layer 1). Callers can use this to re-send the same photo without re-uploading.
persisted_chatbooleanNo—True when the chat row was newly inserted (alias of Layer 2 'persisted').
send_photojsonNo—Result dict from the send_photo 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.
photostringNo—Echoed from input.
captionstringNo—Echoed from input.
parse_modestringNo—Echoed from input.
reply_markupjsonNo—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-photo-api—
2upsert_chatdata.telegram.chat.upsert—
3persist_messagedata.telegram.message.persist—

Execution Flow ​

Sub-workflows ​

Sub-workflowStep name
telegram.message.send-photo-apisend_photo
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-photo",
  "initial_data": {
    "bot_uuid": "value",
    "chat_ref": 123,
    "photo": "value"
  }
}