telegram.bot.get-webhook-info
Read a bot's current webhook configuration via Telegram Bot API (getWebhookInfo). Pure read — no DB writes, no message transmission. Input takes bot_uuid; the token is resolved from the TelegramBot row internally.
Call Telegram getWebhookInfo for a bot identified by bot_uuid.
PENDING (auto_advance=execute) → COMPLETED with webhook config ↘ FAILED on any error
Single-responsibility: one API call, no DB writes, no transmission.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-telegram |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
bot_uuid | uuid | Yes | — | UUID of the TelegramBot row whose token will be used to call getWebhookInfo. The workflow resolves bot_uuid → bot_token internally. |
workflow_run_id | string | No | — | Engine-stamped parent run id (DAG step target) |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | Currently registered webhook URL, or an empty string when the bot is in long-polling mode (no active webhook). |
has_webhook | boolean | Yes | — | Convenience flag: True when url is non-empty (webhook mode active). |
has_custom_certificate | boolean | No | — | True if a self-signed certificate was supplied for the webhook. |
pending_update_count | integer | No | — | Number of updates awaiting delivery. |
webhook_ip | string | No | — | Currently used webhook IP; None when not set (Telegram getWebhookInfo.ip_address). |
last_error_date | integer | No | — | Unix time of the most recent webhook delivery error; None if none. |
last_error_message | string | No | — | Human-readable description of the most recent webhook delivery error. |
max_connections | integer | No | — | Maximum allowed number of simultaneous HTTPS connections to the webhook. |
allowed_updates | json | No | — | List of update types the bot is subscribed to; None means all (except chat_member). |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failure_type | string | No | — | Engine-stamped failure category |
failed_action | string | No | — | Engine-stamped action that raised |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | string | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Read webhook config via Telegram Bot API |
completed | No | Yes | Yes | — | Webhook config captured |
failed | No | Yes | No | — | getWebhookInfo failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "telegram.bot.get-webhook-info",
"initial_data": {
"bot_uuid": "value"
}
}