Download File
telegram.download_file
ActionChat & messagingconnection required
Calls the Telegram API with the connection's credentials.
Download a file's bytes by file_id, as a base64 payload for the next step.
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
2 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
file_id The file_id from an incoming message's photo, document or audio. | string | Yes | — | — | — |
filename Name to give the downloaded file; Telegram's own path name is used when blank. | string | No | — | — | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
file_content The file, base64-encoded. | string | — |
content_encoding | string | base64 |
filename | string | app-main.zip |
content_type | string | application/zip |
size Raw size in bytes (before base64). | number | — |
file_id The file id that was downloaded. | string | — |
file_path The Telegram path the bytes came from. | string | — |
{
"content_encoding": "base64",
"content_type": "application/zip",
"file_content": "",
"file_id": "",
"file_path": "",
"filename": "app-main.zip",
"size": 0
}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 calls getFile and then fetches the bytes, so it is one step rather than two.
- Bots can only download files of up to 20 MB, and the payload is also capped by MANTLE_BINARY_MAX_BYTES because it is stored in the step output. Wire it straight into s3.put_object or gcs.put_object.
See Download File 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.