Portal Community

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

Configuration

Connection

FieldRequiredDescription
botTokenRequiredSlack Bot Token starting with xoxb-. Must have the files:read OAuth scope.

Operation Fields

FieldRequiredDescription
channelOptionalSlack channel ID (e.g. C08ABCDEFGH) to filter files shared in that specific channel. Omit to retrieve workspace-wide files.
userIdOptionalSlack user ID (starting with U) to filter files uploaded by a specific user. Can be combined with channel.
returnAllOptionalBoolean. Default true. When true, paginates automatically through all results. Set to false to respect the limit field.
limitOptionalMaximum 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 CodeCauseResolution
invalid_channelThe 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_foundThe provided userId does not match any workspace member.Validate the user ID against a user/get call first.
missing_scopeBot token lacks the files:read scope.Add files:read under OAuth & Permissions in your Slack App and reinstall.
invalid_authBot token is invalid or revoked.Regenerate the token and update the credential store.

Output

Success Port

FieldTypeDescription
fileCountnumberTotal number of files returned in this result set.
filesarrayArray of file metadata objects. Each entry contains: fileId, fileName, fileSize (bytes), fileType (Slack type string), uploadedBy (user ID).
statusstring"success" on successful retrieval.
errorCodestringEmpty on success. Slack API error code on failure.
payloadobjectRaw 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

ExpressionResult
{{ $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 AreaRecommendation
Pagination PerformanceFor channels with many files, avoid returnAll: true in high-frequency workflows. Use limit to page incrementally and reduce API call overhead.
Compliance ScopingWhen running compliance audits, always filter by channel to scope results. Workspace-wide queries can return sensitive files from unrelated channels.
Rate LimitsSlack'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 LimitsThe file list on free workspaces only reflects files within the storage window. Archived or deleted files will not appear.
Output SizeWith 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
}