file/getMany
Retrieve a list of files from your Slack workspace. Filter by channel, uploading user, or retrieve all files. Supports pagination for large workspaces.
When to Use
- Audit all files shared in a channel before archiving or closing it.
- Find all files uploaded by a specific user as part of a data access review.
- Generate a storage usage report across the workspace or a specific channel.
- List all files in a channel prior to migrating content to an external document store.
- Compliance review of shared content — identify file types and uploaders over a time period.
Configuration
Connection
| Field | Required | Description |
botToken | Required | Slack Bot Token starting with xoxb-. Must have the files:read OAuth scope. |
Operation Fields
| Field | Required | Description |
channel | Optional | Slack channel ID (e.g. C08ABCDEFGH) to filter files shared in that specific channel. Omit to retrieve workspace-wide files. |
userId | Optional | Slack user ID (starting with U) to filter files uploaded by a specific user. Can be combined with channel. |
returnAll | Optional | Boolean. Default true. When true, paginates automatically through all results. Set to false to respect the limit field. |
limit | Optional | Maximum number of files to return when returnAll is false. Default 20. Maximum 1000 per page. |
Sample Configuration
{
"operation": "file/getMany",
"connection": {
"botToken": "{{ $credentials.slackBot.token }}"
},
"channel": "C08COMPLIANCE",
"returnAll": true
}
Validation Errors
| Error Code | Cause | Resolution |
invalid_channel | The provided channel ID does not exist or is inaccessible. | Verify the channel ID and confirm the bot is a member of that channel. |
user_not_found | The provided userId does not match any workspace member. | Validate the user ID against a user/get call first. |
missing_scope | Bot token lacks the files:read scope. | Add files:read under OAuth & Permissions in your Slack App and reinstall. |
invalid_auth | Bot token is invalid or revoked. | Regenerate the token and update the credential store. |
Output
Success Port
| Field | Type | Description |
fileCount | number | Total number of files returned in this result set. |
files | array | Array of file metadata objects. Each entry contains: fileId, fileName, fileSize (bytes), fileType (Slack type string), uploadedBy (user ID). |
status | string | "success" on successful retrieval. |
errorCode | string | Empty on success. Slack API error code on failure. |
payload | object | Raw Slack API response including pagination info. |
Error Port
Activated when the channel or user filter is invalid, or token permissions are insufficient.
Sample Output
{
"fileCount": 3,
"files": [
{
"fileId": "F08XYZ00001",
"fileName": "audit-q1-2026.pdf",
"fileSize": 102400,
"fileType": "pdf",
"uploadedBy": "U01ALICE"
},
{
"fileId": "F08XYZ00002",
"fileName": "data-export-2026-05-01.csv",
"fileSize": 51200,
"fileType": "csv",
"uploadedBy": "U01BOB"
},
{
"fileId": "F08XYZ00003",
"fileName": "system-diagram.png",
"fileSize": 307200,
"fileType": "png",
"uploadedBy": "U01ALICE"
}
],
"status": "success",
"errorCode": "",
"payload": {
"ok": true,
"paging": {
"count": 20,
"total": 3,
"page": 1,
"pages": 1
}
}
}
Expression Reference
| Expression | Result |
{{ $output.getManyFiles.fileCount }} | Total number of files returned — useful for summary notifications. |
{{ $output.getManyFiles.files }} | Full file array for iteration in a loop node. |
{{ $output.getManyFiles.files[0].fileId }} | First file's ID — for spot-check or single-item processing. |
{{ $output.getManyFiles.files[0].uploadedBy }} | Uploader user ID for the first file. |
{{ $output.getManyFiles.files[0].fileSize }} | File size in bytes for the first file. |
Node Policies & GuardRails
| Policy Area | Recommendation |
| Pagination Performance | For channels with many files, avoid returnAll: true in high-frequency workflows. Use limit to page incrementally and reduce API call overhead. |
| Compliance Scoping | When running compliance audits, always filter by channel to scope results. Workspace-wide queries can return sensitive files from unrelated channels. |
| Rate Limits | Slack's files.list API is Tier 3 (50+ requests/min). For large workspaces with thousands of files, build retry logic with exponential backoff on the error port. |
| Free Workspace Limits | The file list on free workspaces only reflects files within the storage window. Archived or deleted files will not appear. |
| Output Size | With returnAll: true, very large workspaces may return thousands of records. Consider piping output to a batch-processing loop rather than holding the full array in memory. |
Examples
Audit Files in Compliance Channel Before Archiving
Before archiving the #compliance-2025 channel, list all files and write them to an external audit database.
{
"operation": "file/getMany",
"channel": "C08COMP2025",
"returnAll": true
}
Find Files Uploaded by a Specific User
As part of an offboarding workflow, retrieve all files uploaded by a departing user so they can be reviewed and reassigned.
{
"operation": "file/getMany",
"userId": "{{ $input.offboardedUserId }}",
"returnAll": true
}
Storage Usage Report — Limited Sample
Pull the 100 most recent files workspace-wide to estimate storage usage and identify large files.
{
"operation": "file/getMany",
"returnAll": false,
"limit": 100
}