New to Kestra?
Use blueprints to kickstart your first workflows.
Download a CSV over HTTP and upload it as a real Slack file attachment via the Slack App API, no webhook workaround needed.
id: send-slack-attachment
namespace: company.team
tasks:
- id: dataset
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/products.csv
- id: upload_to_slack
type: io.kestra.plugin.slack.app.files.Upload
token: "{{ secret('SLACK_BOT_TOKEN') }}"
channels:
- "#general"
from: "{{ outputs.dataset.uri }}"
filename: data.csv
title: Here is your dataset
initialComment: Here is your dataset, attached as a CSV file.
Automate delivering a downloaded file straight to a Slack channel as a real attachment, not just a link in a text message. This blueprint downloads a CSV dataset over HTTP, then uploads it to Slack as a data.csv file using the Slack App API, so you can replace manual "here's the file" uploads with a repeatable, auditable workflow.
File attachments require Slack's App API (a bot token with the files:write scope): Slack's Incoming Webhooks cannot send files, only text and Block Kit messages.
dataset task (io.kestra.plugin.core.http.Download) downloads a CSV file from a public HTTP URL and stores it in Kestra's internal storage, exposing it as {{ outputs.dataset.uri }}.upload_to_slack task (io.kestra.plugin.slack.app.files.Upload) authenticates with a bot token pulled from {{ secret('SLACK_BOT_TOKEN') }} and uploads the downloaded file to #general as data.csv, with title shown alongside it and initialComment attaching a message to the file in the same call.The Slack API can accept a file upload, but it cannot schedule the job, build the file, or react to upstream events. Kestra adds event and schedule triggers, automatic retries on transient HTTP or Slack API failures, full execution lineage so you can see exactly which file was sent and when, and a declarative YAML definition that lives in version control. The Slack upload becomes the last link in a pipeline rather than a disconnected manual action.
files:write scope, installed to your workspace, and its bot token.#general here).SLACK_BOT_TOKEN: your Slack App bot token, used to authenticate the upload.files:write scope, install it to your workspace, and invite the bot to the target channel.SLACK_BOT_TOKEN secret in your Kestra instance.channels list in upload_to_slack to your target channel(s).data.csv as an attachment.dataset URL or replace it with a task that generates a report (for example a query export) and upload that output instead.io.kestra.plugin.email.MailSend with an attachments entry pointing at {{ outputs.dataset.uri }}.timestamp to that message's Slack ts.