Skip to content
Proud to collaborate with Microsoft for Startups

telegram.bot.register ​

Validate a Telegram bot token and persist the bot record (bot_uuid, bot_ref, username, persisted, restored)

End-to-end registration of a Telegram bot.

Validates the supplied bot token via Telegram getMe (Layer 1), then persists a TelegramBot row in the database (Layer 2).

Overview ​

PropertyValue
Workflow typeDag
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—UUID of the organization that owns the bot
bot_tokenstringYes—Telegram Bot API token issued by BotFather (format: <bot_id>:<token_secret>)
workflow_run_uuidstringNo—Engine-stamped parent run uuid (DAG step target)

Output Schema ​

FieldTypeRequiredDefaultDescription
bot_uuidstringNo—UUID of the persisted TelegramBot row (from Layer 2)
bot_refintegerNo—Telegram integer bot ID returned by getMe (from Layer 1)
usernamestringNo—Bot @username (without @) returned by getMe (from Layer 1)
persistedbooleanNo—True when a brand-new TelegramBot row was inserted
restoredbooleanNo—True when a soft-deleted TelegramBot row was undeleted
validate_tokenjsonNo—Result dict from the validate_token step (Layer 1)
persist_botjsonNo—Result dict from the persist_bot step (Layer 2)
organization_uuiduuidNo—Echoed from input
bot_tokenstringNo—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
1validatetelegram.bot.validate-token—
2persistdata.telegram.bot.persist—

Execution Flow ​

Sub-workflows ​

Sub-workflowStep name
telegram.bot.validate-tokenvalidate_token
data.telegram.bot.persistpersist_bot

API Usage ​

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

{
  "workflow_type": "telegram.bot.register",
  "initial_data": {
    "organization_uuid": "value",
    "bot_token": "value"
  }
}