Skip to content
Proud to collaborate with Microsoft for Startups

telegram.update.poll ​

Pull a batch of pending Telegram updates via getUpdates and idempotently persist each one as a TelegramWebhookEvent row via data.telegram.update-event.persist. Returns persisted event_uuids, batch counts, and the next_offset to pass on the following call.

Pull a batch of pending Telegram updates via getUpdates and persist each one.

PENDING (auto_advance=execute) → COMPLETED with event_uuids / counts / next_offset ↘ FAILED on any error

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the TelegramBot to poll for updates
offsetintegerNo—Telegram update offset to fetch from. Pass last_update_id+1 to acknowledge the previous batch. Null or 0 fetches the next pending updates.
limitintegerNo—Number of updates to fetch (Telegram-allowed range 1..100, default 100)
timeoutintegerNo—Long-poll timeout in seconds (default 0 = short-poll). Pass e.g. 25 for long-polling. v1 default is 0.

Output Schema ​

FieldTypeRequiredDefaultDescription
event_uuidsjsonYes—UUIDs of persisted TelegramWebhookEvent rows, in Telegram order (oldest first)
countintegerYes—Number of updates returned by Telegram in this batch
new_countintegerYes—Number of newly inserted rows (count minus already_exists hits)
next_offsetintegerNo—max(update_id)+1 for the batch; null if no updates were returned. Pass this back as offset on the next call to acknowledge.
errorstringNo—Engine-captured exception message
error_typestringNo—Exception class name
failed_at_statestringNo—State name where the failure was recorded
failed_layerstringNo—DAG layer name (N/A for linear workflows)
failed_stepstringNo—DAG step name (N/A for linear workflows)
failure_reasonstringNo—Human-readable reason the workflow failed
failure_typestringNo—Failure category
failed_actionstringNo—Name of the action method that raised
bot_uuiduuidNo—bot_uuid echoed from input on failure

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeFetch updates from Telegram and persist each one
completedNoYesYes—All updates fetched and persisted; next_offset ready
failedNoYesNo—Poll or persist failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "telegram.update.poll",
  "initial_data": {
    "bot_uuid": "value"
  }
}