Upload File

slack.upload_file
ActionChat & messagingconnection required

Calls the Slack Web API with the connection's bot token.

Upload a file with Slack's current external-upload flow and share it into a channel.

Connection

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

Configuration

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

FieldTypeRequiredDefaultConstraintsExample
filename
The file name, with its extension — Slack types the file from it.
stringYes———
body
The file content: text, or a base64 blob from an upstream file step.
stringYes———
content_encoding
Set to 'base64' when body is a base64 blob (e.g. from a download_archive node). Defaults to the upstream file's encoding, else text.
stringNo—one of "text", "base64"—
title
The title shown above the file in Slack. Defaults to the filename.
stringNo———
channel_id
Channel id to share the file into. Left empty, the file stays private to this app.
stringNo———
initial_comment
A message posted with the file. Supports {{ }}.
stringNo———
thread_ts
Share the file as a reply in this thread (the parent message's ts).
stringNo———
snippet_type
Syntax to highlight a text snippet with, e.g. python or sql.
stringNo———
alt_txt
Description of an image for screen readers.
stringNo———

Output

One shape.

result

FieldTypeExample
ok
Always true; a failure raises instead.
booleantrue
file_id
The Slack file id (F…) of the uploaded file.
string—
filename
The file name that was uploaded.
string—
title
The title Slack stored for the file.
string—
channel_id
The channel it was shared into, or empty.
string—
files
The file objects Slack returned for the completed upload.
array—
{
  "channel_id": "",
  "file_id": "",
  "filename": "",
  "files": [],
  "ok": true,
  "title": ""
}

Notes

  • The bot must be a member of a private channel before it can act there (Slack answers not_in_channel otherwise).
  • Slack rate-limits each Web API method on its own tier; a throttled call fails with the number of seconds to wait and is safe for the node's retry policy to repeat.
  • files.upload is retired; this node runs getUploadURLExternal → POST bytes → completeUploadExternal, which is the supported flow.
  • The content is held in memory and capped by MANTLE_BINARY_MAX_BYTES; a larger file fails the step instead of exhausting the worker.

See Upload File run in a workflow.

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