feat(slack): add download-file action for on-demand file attachment access#24723
Merged
Takhoffman merged 3 commits intoopenclaw:mainfrom Mar 1, 2026
Merged
Conversation
…ccess Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681
7ad6450 to
d20da34
Compare
1 task
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 1, 2026
…ccess (openclaw#24723) Cherry-pick of upstream 2c5b898.
ansh
pushed a commit
to vibecode/openclaw
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
18 tasks
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
amitmiran137
pushed a commit
to amitmiran137/openclaw
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
sachinkundu
pushed a commit
to sachinkundu/openclaw
that referenced
this pull request
Mar 6, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…ccess (openclaw#24723) * feat(slack): add download-file action for on-demand file attachment access Adds a new `download-file` message tool action that allows the agent to download Slack file attachments by file ID on demand. This is a prerequisite for accessing images posted in thread history, where file attachments are not automatically resolved. Changes: - Add `files` field to `SlackMessageSummary` type so file IDs are visible in message read results - Add `downloadSlackFile()` to fetch a file by ID via `files.info` and resolve it through the existing `resolveSlackMedia()` pipeline - Register `download-file` in `CHANNEL_MESSAGE_ACTION_NAMES`, `MESSAGE_ACTION_TARGET_MODE`, and `listSlackMessageActions` - Add `downloadFile` dispatch case in `handleSlackAction` - Wire agent-facing `download-file` → internal `downloadFile` in `handleSlackMessageAction` Closes openclaw#24681 * style: fix formatting in slack-actions and actions * test(slack): cover download-file action path --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…ccess (openclaw#24723) Cherry-pick of upstream 2c5b898.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
download-filemessage tool action so the agent can fetch Slack file attachments on demand by file ID. This is the pragmatic fix for the issue described in #24681 — rather than eagerly resolving all images from thread history (which would require changes to the prepare pipeline), the agent can now fetch specific files when it encounters afilesarray in a thread message.Changes
src/slack/actions.ts: Addfilesfield toSlackMessageSummarytype + newdownloadSlackFile()function that fetches fresh metadata viafiles.infoand resolves the file through the existingresolveSlackMedia()pipelinesrc/slack/message-actions.ts: Add"download-file"tolistSlackMessageActions(gated on themessagesaction flag, same asread)src/channels/plugins/message-action-names.ts: Register"download-file"inCHANNEL_MESSAGE_ACTION_NAMESsrc/infra/outbound/message-action-spec.ts: Add"download-file": "none"toMESSAGE_ACTION_TARGET_MODEsrc/agents/tools/slack-actions.ts: AdddownloadFiledispatch case inhandleSlackActionsrc/plugin-sdk/slack-message-actions.ts: Wire agent-facing"download-file"→ internal"downloadFile"inhandleSlackMessageActionHow it works
When the agent reads thread history via
action: read, messages with attachments now include afilesarray withid,name, andmimetype. The agent can then callaction: download-filewith thefileIdto download and view the image — usingfiles.infoto get a freshurl_private_download, then resolving it through the sameresolveSlackMedia()path used for live messages.Testing
Tested end-to-end on a live Slack workspace: the agent successfully reads thread history, identifies file IDs from the
filesarray, downloads images via the new action, and describes their content.Closes #24681
Greptile Summary
Adds
download-fileaction for agents to fetch Slack attachments on-demand by file ID. The implementation reuses the existingresolveSlackMedia()pipeline with proper security validation. Key changes:filesfield toSlackMessageSummarytype to expose file metadata (id, name, mimetype) when reading thread historydownloadSlackFile()function that fetches fresh metadata viafiles.infoAPI to avoid stale private URLsmessagesaction flag as the existingreadaction for consistent access controlmediaMaxMblimits with fallback to 20MB defaultThe change enables agents to selectively download files from thread history rather than eagerly fetching all attachments, providing better control over bandwidth and resource usage.
Confidence Score: 5/5
Last reviewed commit: 4b426f5
(2/5) Greptile learns from your feedback when you react with thumbs up/down!