Back to catalog / Agent workflows
Deliver CSV analysis in a Slack thread with follow-ups
Connect an @mention and CSV attachment to an analysis session, stream progress in-thread, and return the report there.
Goal
Goal: Connect an @mention and CSV attachment to an analysis session, stream progress in-thread, and return the report there.
Steps
- Use Slack Bolt
@app.event("app_mention")to acknowledge the event and capture channel, thread timestamp, and question. [slack] - Send the attachment to the data-analyst session; persist its ID with the Slack thread key and post progress with
say(..., thread_ts=...). [slack] - Post the completed report or link in that thread; reuse the session for follow-ups and archive it when finished. [slack]
How to verify
Simulate a mention, CSV attachment, and follow-up; verify one acknowledgement and all output in the same thread.
Troubleshooting
Deduplicate repeated events by event ID; check Socket Mode scopes and whether the app joined the channel.
Permissions
Prerequisites
- Python 3.11+, Anthropic API key, Slack bot token, `connections:write` app-level token, and a configured analyst agent.
Permissions
- Invite the bot only to authorized channels; verify file permissions and avoid echoing sensitive data in threads.
Limitations
The demo stores tokens in `.env`; production should use a secret manager and minimize Slack scopes.
Pinned upstream source
- Repository
- anthropics/anthropic-cookbook
- File path
- managed_agents/slack_data_bot.ipynb
- Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Turn ecommerce campaign materials into a reviewable weekly brief