Set Bot Commands

telegram.set_my_commands
ActionChat & messagingconnection required

Calls the Telegram API with the connection's credentials.

Replace the command list clients show in the bot's menu.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Telegram
Secret shape
the bot token, or {"token": "…"}
Resolved by
config.connection_id, else node.connection_id

Configuration

3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
commands
JSON array of at most 100 objects: {"command": "status", "description": "Show the current status"}. Commands are 1-32 lowercase letters, digits and underscores.
arrayYes—1–100 characters; array of object[{"command":"status","description":"Show the current status"}]
scope
Optional BotCommandScope, e.g. {"type": "all_private_chats"}; the default scope is used when blank.
objectNo——{"type":"all_private_chats"}
language_code
Two-letter ISO 639-1 code these commands are for; blank means every language.
stringNo—2–2 characters—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "commands": [
    {
      "command": "status",
      "description": "Show the current status"
    }
  ],
  "scope": {
    "type": "all_private_chats"
  }
}

Output

One shape.

result

FieldTypeExample
ok
True when Telegram accepted the call.
booleantrue
count
How many commands were set.
number—
{
  "count": 0,
  "ok": true
}

Notes

  • chat_id is a numeric chat/user id or an @channelusername. A bot can only message a user who started it, or a group/channel it has been added to.
  • The bot token sits in the request URL, so it is redacted out of every error message and dry-run report these nodes produce.
  • Telegram answers HTTP 200 even for failures; the node reads the {'ok': …} envelope and raises on ok:false with Telegram's own description.
  • This replaces the whole list for the given scope and language rather than adding to it.

See Set Bot Commands run in a workflow.

In a technical demo we add the Telegram connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.