Skip to content
Proud to collaborate with Microsoft for Startups

telegram.callback.answer-api ​

Acknowledge a Telegram inline keyboard button press via answerCallbackQuery. Input takes bot_uuid; the token is resolved from the TelegramBot row internally. Without this call, the user's client shows a loading spinner indefinitely.

Call Telegram answerCallbackQuery for a bot identified by bot_uuid.

PENDING (auto_advance=execute) → COMPLETED with acknowledgement result ↘ FAILED on any error

Single-responsibility: one API call, no DB writes. Acknowledges a callback_query so the user's Telegram client stops showing a loading spinner on the pressed inline keyboard button.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_uuiduuidYes—UUID of the TelegramBot row whose token will be used to answer the callback. The workflow resolves bot_uuid → bot_token internally.
callback_query_refstringYes—Telegram's string identifier for the callback query, taken from the callback_query.id field of the inbound update. Telegram only accepts answers within ~10 minutes of the button press.
textstringNo—Optional notification text shown to the user (max 200 characters). If null, the loading spinner disappears silently.
show_alertbooleanNo—If true, Telegram pops a modal alert dialog instead of an inline toast. Defaults to false.
urlstringNo—URL that will be opened by the user's client. Used only for Game or LoginUrl buttons — not relevant for typical callback_data buttons.
cache_timeintegerNo—Time in seconds that the result of the callback query may be cached client-side. Telegram defaults to 0.

Output Schema ​

FieldTypeRequiredDefaultDescription
okbooleanYes—True when Telegram accepted the answerCallbackQuery call. Telegram's API always returns true on success for this method.
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—executeAcknowledge callback query via Telegram Bot API
completedNoYesYes—Callback query acknowledged; Telegram confirmed ok=true
failedNoYesNo—Callback query acknowledgement failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "telegram.callback.answer-api",
  "initial_data": {
    "bot_uuid": "value",
    "callback_query_ref": "value"
  }
}