Skip to content
Proud to collaborate with Microsoft for Startups

telegram.bot.enable-webhook ​

Register a public HTTPS URL as the Telegram webhook and persist the webhook config (URL + secret_token) on the TelegramBot row (bot_uuid, webhook_url, previous_webhook_url, ok)

End-to-end webhook enablement for a Telegram bot.

Calls Telegram setWebhook to register the public HTTPS URL (Layer 1), then persists the webhook_url and secret_token on the TelegramBot row so the api-core receiver can verify incoming updates (Layer 2).

Overview ​

PropertyValue
Workflow typeDag
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the TelegramBot row whose token will be used to call setWebhook and whose webhook_url will be updated.
webhook_urlstringYes—Public HTTPS URL where Telegram will POST update events, e.g. https://orkestia.ltinteg.local/api/telegram/webhook/<signed_bot_uuid>. Must begin with https://.
secret_tokenstringNo—Optional secret token (1-256 chars, [A-Za-z0-9_-]) that Telegram includes in the X-Telegram-Bot-Api-Secret-Token header on every webhook call so the receiver can verify the call's origin. Stored as TelegramBot.webhook_secret. Recommended.
allowed_updatesjsonNo—Optional list of update types to receive, e.g. ['message', 'callback_query']. If null or empty, Telegram sends all types except chat_member and chat_join_request.
drop_pending_updatesbooleanNo—If true, Telegram drops any queued updates from the polling era before activating webhook mode. Useful when switching from long-polling.
workflow_run_uuidstringNo—Engine-stamped parent run uuid (DAG step target)

Output Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidNo—UUID of the TelegramBot row (echoed from input via Layer 2)
webhook_urlstringNo—The webhook URL now active on the bot (from Layer 2)
previous_webhook_urlstringNo—The webhook URL that was on the row before this call. Equals webhook_url when the action was a no-op (already matched). Null when no webhook was previously configured.
okbooleanNo—True when Telegram accepted the setWebhook call (from Layer 1). Always true on the success path.
set_webhookjsonNo—Result dict from the set_webhook step (Layer 1)
update_webhook_configjsonNo—Result dict from the update_webhook_config step (Layer 2)
secret_tokenstringNo—Echoed from input
allowed_updatesjsonNo—Echoed from input
drop_pending_updatesbooleanNo—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
1set_webhooktelegram.bot.set-webhook—
2update_configdata.telegram.bot.update-webhook-config—

Execution Flow ​

Sub-workflows ​

Sub-workflowStep name
telegram.bot.set-webhookset_webhook
data.telegram.bot.update-webhook-configupdate_webhook_config

API Usage ​

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

{
  "workflow_type": "telegram.bot.enable-webhook",
  "initial_data": {
    "bot_uuid": "value",
    "webhook_url": "value"
  }
}