Get File Info

telegram.get_file
ActionChat & messagingconnection required

Calls the Telegram API with the connection's credentials.

Look up a file's path and size so it can be downloaded.

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

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

FieldTypeRequiredDefaultConstraintsExample
file_id
The file_id from an incoming message's photo, document or audio.
stringYes———

Output

One shape.

result

FieldTypeExample
ok
True when Telegram accepted the call.
booleantrue
file_id
The file id that was looked up.
string—
file_unique_id
Stable id for the file across bots; not downloadable.
string—
file_path
Path to fetch the bytes with; valid for about an hour.
string—
file_size
Size of the file in bytes.
number—
{
  "file_id": "",
  "file_path": "",
  "file_size": 0,
  "file_unique_id": "",
  "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.
  • Bots can only fetch files of up to 20 MB.
  • Use telegram.download_file to get the bytes in one step instead.

See Get File Info 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.