Skip to content
Proud to collaborate with Microsoft for Startups

data.telegram.bot.update-webhook-config ​

Persist the outcome of a Telegram setWebhook/deleteWebhook call by updating webhook_url and webhook_secret on the TelegramBot row identified by bot_uuid. Pass webhook_url=null to clear (disable). Idempotent on matching values.

Update webhook_url and webhook_secret on an existing TelegramBot row.

Pass webhook_url=<url> (enable / reconfigure) or webhook_url=None (disable). Idempotent: if both fields already match the stored values the row is not mutated and the action still returns SUCCESS.

Called internally by telegram.bot.enable-webhook and telegram.bot.disable-webhook DAGs after the Telegram API call succeeds.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the TelegramBot row to update. Resolved internally to the integer FK; never exposed outward.
webhook_urlstringYes—New webhook URL to set on the TelegramBot row. Pass the HTTPS URL when enabling; pass null when disabling. The field is required (not optional) so the caller must be explicit about intent — a missing field is an authoring error.
webhook_secretstringNo—Optional secret_token for Telegram's X-Telegram-Bot-Api-Secret-Token header. Pass the secret when enabling so the api-core webhook receiver can verify origin. Pass null when disabling.
workflow_run_idstringNo—Engine-stamped parent run id (DAG step target)

Output Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the updated TelegramBot row (echoed from input).
webhook_urlstringNo—The new webhook_url value now stored on the row (may be null).
previous_webhook_urlstringNo—The webhook_url that was on the row before this call. Equals webhook_url when the action was a no-op (values already matched).
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—completeUpdate webhook config on TelegramBot row
completedNoYesYes—Webhook config updated (or already matched — no-op)
failedNoYesNo—Webhook config update failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingcompletecompleted—
pendingfailfailed—

API Usage ​

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

{
  "workflow_type": "data.telegram.bot.update-webhook-config",
  "initial_data": {
    "bot_uuid": "value",
    "webhook_url": "value"
  }
}