Slack report delivery

StaleSweep can post a cost-report summary — and attach the full report PDF — to your Slack channels, either on demand or on a recurring schedule.

Tip: Slack is one of three delivery channels. StaleSweep sends the same reports to Microsoft Teams and to email recipients as well — all configured on the same Notifications page, each with its own connections and recurring schedules. This page covers the Slack-specific setup.

Delivery uses a Slack app bot token that you create in your own workspace. StaleSweep uploads the PDF with the summary as its comment (files.uploadV2) so both arrive as one message; if the PDF can't be generated it falls back to posting the summary on its own (chat.postMessage). The token is stored encrypted and is never shown back to you or written to logs — the UI only keeps a short hint (the last few characters) so you can tell two connections apart.

Tip: Managing Slack connections and schedules requires an admin role in StaleSweep. Anyone can see whether delivery is configured, but only admins can add, edit, or remove a channel.

Step 1 — Create a Slack app and bot token

You do this once, in your Slack workspace. It takes a couple of minutes.

  1. Go to api.slack.com/apps Create New App From scratch. Name it (for example StaleSweep) and pick your workspace.
  2. Open OAuth & Permissions. Under Bot Token Scopes, add both:
    • chat:write — post the report summary message.
    • files:write — upload the report PDF.
  3. Click Install to Workspace and approve.
  4. Copy the Bot User OAuth Token. It starts with xoxb-. This is the token you paste into StaleSweep.
Warning: A Slack token permanently carries only the scopes it had when it was created. If you add or change scopes later, you must reinstall the app (OAuth & Permissions → Reinstall) and paste the new token into StaleSweep — the old token keeps its old (missing) scopes.

Step 2 — Get the channel ID and invite the bot

  1. In Slack, invite the app to the destination channel: type /invite @StaleSweep (use your app's name) in that channel. The bot must be a member, or posting and uploads are rejected.
  2. Get the channel ID: open the channel, click its name to open Channel details, and copy the Channel ID at the bottom (it looks like C0123ABCD). It is not the #name— it's the ID.

Step 3 — Connect the channel in StaleSweep

  1. Go to Notifications and find the Slack card → Add channel.
  2. Paste the Channel id (C0123ABCD) and the Bot token (xoxb-…).
  3. Optionally set a Label (e.g. #finops) so the connection is easy to recognize. It's cosmetic — the channel ID is what delivery uses.
  4. Save. You can connect multiple channels (e.g. one for finance, one for engineering).

On each connected channel you can pick a report type and use Send now to post immediately, Test to verify the token and membership, toggle it on/off, or remove it. If a delivery fails, the row shows the reason (for example a missing scope or the bot not being in the channel).

Step 4 — Schedule recurring reports (optional)

In the Scheduled reports section of the Slack card, add a schedule:

  • Channel: which connected channel to post to.
  • Report type: the same report types available on the Reports page (e.g. executive summary, full inventory).
  • Scope: all connected AWS accounts, or a single connection.
  • Cadence: daily, every other day, weekly, every 2 weeks, monthly, or every 2 months — with a time of day. Times are shown in your local timezone and stored in UTC.

Each scheduled post includes the summary and the attached PDF, exactly like Send now. Pause, edit, or delete a schedule at any time.

What a message looks like

Each post is a single message: the complete report PDF attached, with a summary above it — the report scope, potential monthly savings, the number of unused resources, realized savings to date, and the top savings opportunities (each with its estimated monthly cost, resource name/ID, AWS account name, and region), plus a link to open the full report. The summary and the PDF arrive together, at the same time.

Troubleshooting

“missing the ‘chat:write’ scope” (or ‘chat:write:bot’)

The saved token doesn't carry the scope. This almost always means the token was created before you added the scope. Add chat:write (and files:write) to the app's Bot Token Scopes, reinstall the app, then edit the channel in StaleSweep and paste the new xoxb- token. chat:write:botis Slack's legacy name for chat:write — there is no separate scope to add by that name.

“not in channel”

The bot isn't a member of the target channel. Run /invite @YourAppName in that channel and retry.

“channel not found”

The channel ID is wrong, or the bot can't see that channel. Re-copy the ID from Channel details (it starts with C), and make sure the bot was invited. For a private channel, the bot must be added to it explicitly.

The summary arrives but without the PDF

Normally the summary and PDF are one message. If the report PDF can't be generated, StaleSweepstill posts the summary on its own so the delivery isn't lost, and the row notes the PDF error. If it persists, contact support — the report is always available to download from the Reports page in the app.

Tip: StaleSweep only ever posts to the channels you connect, and only report content you can already see in the app. It never reads messages, joins other channels, or uses the token for anything besides posting the summary and uploading the PDF.