Download Media

matrix.download_media
ActionChat & messagingconnection required

Calls the Matrix API with the connection's credentials.

Download a file from the content repository as a base64 file payload.

Connection

Required
Yes — the node will not save without one
Auth type
Bearer token
Providers
Matrix
Secret shape
the account access token, or {"access_token": "…"}
Config it needs
base_url, user_id, default_room_id
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.

FieldTypeRequiredDefaultConstraintsExample
mxc_uri
The file's mxc:// URI, e.g. from an event's content.url.
stringYes——mxc://example.org/AbCdEf
timeout_ms
How long the homeserver may spend fetching a remote file, in milliseconds.
numberNo—≥ 0—

Example configuration

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

{
  "mxc_uri": "mxc://example.org/AbCdEf"
}

Output

One shape.

result

FieldTypeExample
file_content
The file, base64-encoded.
string—
content_encoding
stringbase64
filename
stringapp-main.zip
content_type
stringapplication/zip
size
Raw size in bytes (before base64).
number—
content_uri
The mxc:// URI that was downloaded.
string—
{
  "content_encoding": "base64",
  "content_type": "application/zip",
  "content_uri": "",
  "file_content": "",
  "filename": "app-main.zip",
  "size": 0
}

Notes

  • The connection's base_url is the homeserver (e.g. https://matrix.example.org), not the account's server name; the two differ whenever .well-known delegation is in use.
  • Rooms are addressed by room id (!abc:server). Resolve a #alias:server with matrix.resolve_room_alias first, or set a default room on the connection.
  • Uses the authenticated media endpoint; the deprecated unauthenticated /_matrix/media/v3/download is not used.
  • Uses the authenticated media API, which homeservers implement from Matrix 1.11; an older homeserver answers 404 here.
  • The file travels between steps as base64 and is capped by MANTLE_BINARY_MAX_BYTES.

See Download Media run in a workflow.

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