telegram.message.delete-api ​
Delete a message via Telegram Bot API (deleteMessage) and return whether it succeeded. Input takes bot_uuid; the token is resolved from the TelegramBot row internally.
Call Telegram deleteMessage for a bot identified by bot_uuid.
PENDING (auto_advance=execute) → COMPLETED with {ok, chat_ref, message_ref} ↘ FAILED on any error
Single-responsibility: one API call, no DB writes.
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 delete the message. The workflow resolves bot_uuid → bot_token internally. |
chat_ref | integer | Yes | — | Telegram integer chat reference the message lives in. Negative for groups/channels (e.g. -100123456), positive for private chats. |
message_ref | integer | Yes | — | Telegram integer message id to delete (message_id from the send response). |
workflow_run_id | string | No | — | Engine-stamped parent run id (DAG step target) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
ok | boolean | Yes | — | True when Telegram accepted the deleteMessage call. |
chat_ref | integer | Yes | — | Telegram integer chat reference (echo of input). |
message_ref | integer | Yes | — | Telegram integer message id that was deleted (echo of input). |
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 | Delete message via Telegram Bot API |
completed | No | Yes | Yes | — | Message deleted |
failed | No | Yes | No | — | Message delete 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.message.delete-api",
"initial_data": {
"bot_uuid": "value",
"chat_ref": 123,
"message_ref": 123
}
}