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.

SubTypestring

Target channels

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

Initial comment

Optional message attached to the uploaded file.

Reference (ref) of the pluginDefaults to apply to this task.

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