← All use cases

Post the report to Slack

Some people live in Slack, not email. A Slack destination uploads the file to a channel as one post, with a message you template, and Slack previews the workbook in the thread. A channel is given by name or ID; a person by user ID, for a DM.

Recorded from a real run: the command, then the post in Slack.

Recorded from a real run: the command, then the post in Slack.

A Slack channel with a post from the DRE bot: a message and the attached Excel workbook, previewed
The post in Slack (a real screenshot of a test workspace, cropped to the message).
reports/slack_post/slack_post.yml
queries:
  - {query: finance_regions, tab_name: By region}
output:
  format: xlsx
  columns:
    net: {format: "#,##0.00"}
  destination:
    profile: slack
    channel: "#test-reports"
    message: ":bar_chart: Sales {{ period(var('period')).start.date }} to {{ period(var('period')).end.date }}"
profiles.yml
destinations:
  slack:
    target: dev
    targets:
      dev: {type: slack, token: "{{ env_var('DRE_SECRET_SLACK_BOT_TOKEN') }}"}
terminal
dre run slack_post