Slack Upload

Slack Upload

Certified

Upload a file to Slack

Uploads a file from Kestra internal storage to one or more channels (optionally threaded). Requires files: write; threads need the chat: write scope.

yaml
type: io.kestra.plugin.slack.app.files.Upload

Upload a file to a Slack channel

yaml
id: slack_file_upload
namespace: company.team

tasks:
  - id: upload_file
    type: io.kestra.plugin.slack.app.files.Upload
    token: "{{ secret('SLACK_TOKEN') }}"
    channels: ["#general"]
    from: "{{ outputs.previous_task.uri }}"
    filename: "report.pdf"
    title: "Monthly Report"
    initialComment: "Here is the monthly report."

Upload a file with a title and alt text

yaml
id: slack_file_upload_detailed
namespace: company.team

tasks:
  - id: upload_file
    type: io.kestra.plugin.slack.app.files.Upload
    token: "{{ secret('SLACK_TOKEN') }}"
    channels: ["#general", "#reports"]
    from: "{{ inputs.file }}"
    filename: "analysis.png"
    title: "Data Analysis Chart"
    altTxt: "Chart showing sales trends over the last quarter"

Upload a file as a thread reply

yaml
id: slack_file_thread_upload
namespace: company.team

tasks:
  - id: upload_file
    type: io.kestra.plugin.slack.app.files.Upload
    token: "{{ secret('SLACK_TOKEN') }}"
    channels: ["#general"]
    from: "{{ outputs.generate_report.uri }}"
    filename: "detailed_report.pdf"
    title: "Detailed Report"
    timestamp: "{{ outputs.send_message.timestamp }}"
Properties

Filename

Source file URI

Internal storage URI of the file to upload (inputs/outputs/other tasks).

Slack token

Alt text

Accessibility text, useful for images or visual content.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
SubTypestring

Target channels

Channel IDs or names to share the file to; multiple allowed.

Initial comment

Optional message attached to the uploaded file.

Snippet language

Syntax highlighting label for code snippets (e.g., python, java, javascript).

Thread timestamp

Slack ts to post the file as a thread reply; requires matching channel and chat: write.

File title

Optional display title shown in Slack.

Uploaded file ID

Filename

Public permalink

File title

Private URL