Skip to content

feat(slack_app): request files:read scope so the bot can download attachments - #73568

Merged
VojtechBartos merged 1 commit into
masterfrom
vojtab/slack-files-read-scope
Jul 24, 2026
Merged

feat(slack_app): request files:read scope so the bot can download attachments#73568
VojtechBartos merged 1 commit into
masterfrom
vojtab/slack-files-read-scope

Conversation

@VojtechBartos

@VojtechBartos VojtechBartos commented Jul 24, 2026

Copy link
Copy Markdown
Member

Problem

Mentioning the bot with an image or file attached fails: it replies that the attachment "failed to download from Slack." The install never requests files:read, so the bot token can't read files. Slack returns an HTML interstitial instead of the bytes, the download path rejects it, and the attachment is skipped.

Changes

Add files:read to SlackIntegrationScopeInReview (in frontend/src/types.ts) and regenerate the schema. In-review scopes are only requested in DEV/DEBUG, so this avoids invalid_scope on Cloud until Slack approves the public app.

Note

Also requires adding files:read to the DEV Slack app manifest and reconnecting the integration to grant it.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Vojta reported the bug and asked me (Claude) to investigate and open this PR.

…achments

Without files:read, Slack answers the url_private download with an HTTP 200
HTML interstitial instead of the file bytes. The attachment download path
rejects that HTML and skips the file, so image and file attachments never
reach the agent.

Add files:read to SlackIntegrationScopeInReview so it is requested in DEV and
local DEBUG installs (where the Slack app manifest can list in-review scopes),
without tripping invalid_scope on US/EU Cloud until Slack approves it.
@VojtechBartos VojtechBartos self-assigned this Jul 24, 2026
@VojtechBartos
VojtechBartos requested a review from a team July 24, 2026 15:50
@VojtechBartos
VojtechBartos marked this pull request as ready for review July 24, 2026 15:50
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ✅ ready

▶ Open the preview

🔑 Login test@posthog.com / 12345678 (demo data)
🧩 Running this PR's backend and frontend, on the PostHog :master base
🔗 Link stable across rebuilds — a re-push swaps the box underneath, the URL stays
🔒 Access tailnet only (PostHog VPN)
🛠️ Admin inspect & debug state in hogland
💤 Idle sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen

commit 508fc5e · box box-a97e5610a15e · ready in 917s (push → usable) · build log · rebuilds on every push, torn down on close

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(slack_app): request files:read scop..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

🤖 CI report

Playwright — all passed

All tests passed.

View test results →

@VojtechBartos
VojtechBartos merged commit e5b5d35 into master Jul 24, 2026
322 of 360 checks passed
@VojtechBartos
VojtechBartos deleted the vojtab/slack-files-read-scope branch July 24, 2026 18:08
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-24 18:40 UTC Run
prod-us ✅ Deployed 2026-07-24 19:02 UTC Run
prod-eu ✅ Deployed 2026-07-24 19:04 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants