Skip to content

Upload File

Slack

Slack

Upload File

Uploads and optionally shares files in one Slack channel using Slack's external upload flow.

Action

Inputs

Name Type Required Description
filesfilesRequiredFiles to upload. Each file should include base64 content and a filename.
channel_idtextOptionalThe ID of a single channel where Slack should share the uploaded file. Leave empty to keep the upload private.
initial_commenttextOptionalMessage text to send together with the uploaded files. If provided, Slack ignores blocks.
blocksarray of objectOptionalBlock Kit blocks to share with the uploaded files when initial_comment is not provided. Same raw Block Kit structure as Send Message.
thread_tstextOptionalProvide a parent message ts to share the uploaded files as a thread reply (requires channel_id).

Outputs

Name Type Description
okyes/noIndicates whether the Slack upload request succeeded.
filesarray of objectFile metadata returned by Slack after the upload is completed.
idtextSlack file identifier.
titletextSlack file title.
mimeTypetextMIME type of the uploaded file.
sizenumberSize of the uploaded file in bytes.
url_privatetextPrivate Slack URL for the uploaded file.
permalinktextSlack permalink for the uploaded file.
channel_idtextThe single channel ID used when the upload was shared to one channel.
thread_tstextThe thread timestamp used for the upload, when provided.
errortextSlack error code or upload failure summary when ok is false.
failuretextHuman-readable failure message when upload fails.
failureReasontextMachine-readable failure reason or Slack error code.
response_metadataobjectSlack response metadata, including partial upload failure details (warnings, messages, next_cursor, fileUploadFailures).
tenantIntegrationIdtextThe Slack connection that executed this upload.