Portal Community

file/upload

Upload a file to your Slack workspace and optionally share it immediately to one or more channels. Accepts any file type up to 1 GB as base64-encoded content.

When to Use

Note: Files shared to a channel appear in that channel's Files tab and are searchable by members. The channelId field is optional — omit it to upload the file to the workspace without sharing it immediately. You can share it later using a message with the file ID.

Configuration

Connection

FieldRequiredDescription
botTokenRequiredSlack Bot Token starting with xoxb-. Must have the files:write OAuth scope. Obtained from your Slack App configuration under OAuth & Permissions.

Operation Fields

FieldRequiredDescription
fileNameRequiredThe name to assign to the uploaded file, including extension (e.g. monthly-report.pdf). Shown in the Slack UI.
fileContentBase64RequiredThe full binary content of the file encoded as a Base64 string. Binary files (PDFs, images, archives) must be encoded before passing to this field. Maximum size is 1 GB.
channelIdOptionalSlack channel ID (e.g. C08ABCDEFGH) to share the file immediately after upload. Omit to upload without sharing.
titleOptionalA human-readable title displayed above the file in Slack. Defaults to fileName if omitted.

Sample Configuration

{
  "operation": "file/upload",
  "connection": {
    "botToken": "{{ $credentials.slackBot.token }}"
  },
  "fileName": "monthly-sales-report.pdf",
  "fileContentBase64": "{{ $output.generateReport.pdfBase64 }}",
  "channelId": "C08REPORTS1",
  "title": "Monthly Sales Report — {{ $now | date:'MMMM yyyy' }}"
}

Validation Errors

Error CodeCauseResolution
file_too_largeFile content exceeds 1 GB after decoding.Split the file or compress it before encoding to Base64.
invalid_channelThe supplied channelId does not exist or is not accessible by the bot.Verify the channel ID in Slack and ensure the bot has been added to that channel.
not_in_channelBot is not a member of the specified channel.Invite the bot to the channel with /invite @YourBot in Slack.
invalid_authBot token is invalid, expired, or revoked.Regenerate the bot token in your Slack App settings and update the credential.
missing_scopeBot token lacks the files:write OAuth scope.Add files:write under OAuth & Permissions in your Slack App and reinstall the app.

Output

Success Port

FieldTypeDescription
fileIdstringSlack-assigned file identifier (e.g. F08ABCDEFGH). Use this to reference the file in subsequent nodes.
fileNamestringThe file name as stored in Slack, matching the input fileName.
channelIdstringChannel ID the file was shared to. Empty string if no channel was specified.
statusstring"success" on successful upload.
errorCodestringEmpty on success. Contains the Slack API error code on failure.
payloadobjectRaw Slack API response object for advanced inspection.

Error Port

Activated when the Slack API returns an error or the file content is invalid. The errorCode field in the output will contain the specific Slack error string.

Sample Output

{
  "fileId": "F08XYZ12345",
  "fileName": "monthly-sales-report.pdf",
  "channelId": "C08REPORTS1",
  "status": "success",
  "errorCode": "",
  "payload": {
    "ok": true,
    "file": {
      "id": "F08XYZ12345",
      "name": "monthly-sales-report.pdf",
      "title": "Monthly Sales Report — May 2026",
      "mimetype": "application/pdf",
      "size": 204800,
      "url_private": "https://files.slack.com/files-pri/T01ABC/F08XYZ12345/monthly-sales-report.pdf",
      "permalink": "https://yourworkspace.slack.com/files/UBOT/F08XYZ12345/monthly-sales-report.pdf"
    }
  }
}

Expression Reference

ExpressionResult
{{ $output.uploadFile.fileId }}The Slack file ID, usable in subsequent message nodes to reference the uploaded file.
{{ $output.uploadFile.fileName }}The stored file name, useful for confirmation messages.
{{ $output.uploadFile.channelId }}Channel the file was shared to; empty if uploaded without sharing.
{{ $output.uploadFile.status }}Upload status string — "success" or error description.
{{ $output.uploadFile.payload.file.permalink }}Public permalink URL to the file in Slack.

Node Policies & GuardRails

Policy AreaRecommendation
File SizeMaximum file size is 1 GB per upload. Files approaching this limit should be compressed or split to reduce transfer time and API timeout risk.
Sensitive ContentStore files containing PII, credentials, or financial data only in private channels. Never upload unencrypted secrets files to public channels.
Base64 EncodingAll binary files (PDFs, images, archives, executables) must be Base64-encoded before passing to fileContentBase64. Plain text files may be passed as UTF-8 Base64.
Free Workspace RetentionFiles on free Slack workspaces older than 90 days may be deleted automatically. Archive important files to external storage before this threshold.
Token ScopeUse a dedicated bot token with only files:write scope where possible. Avoid using admin tokens for routine file uploads.
Channel MembershipEnsure the bot has been invited to the target channel before the workflow runs. Automate bot invitation as part of channel provisioning workflows.

Examples

Upload a PDF Report to a Reports Channel

At the end of a monthly reporting workflow, generate a PDF summary and deliver it directly to the #finance-reports channel.

{
  "operation": "file/upload",
  "fileName": "finance-summary-may-2026.pdf",
  "fileContentBase64": "{{ $output.buildReport.pdfBase64 }}",
  "channelId": "C08FINANCE1",
  "title": "Finance Summary — May 2026"
}

Upload Without Sharing (Stage for Later Use)

Upload a file to the workspace without sharing it to any channel. Retrieve the fileId and attach it to a targeted DM in a later node.

{
  "operation": "file/upload",
  "fileName": "incident-log-2026-05-26.txt",
  "fileContentBase64": "{{ $output.collectLogs.contentBase64 }}",
  "title": "Incident Log — 2026-05-26"
}

Upload Audit CSV to Compliance Channel

After completing a nightly data audit, post the results CSV to #compliance for review.

{
  "operation": "file/upload",
  "fileName": "audit-results-{{ $now | date:'yyyy-MM-dd' }}.csv",
  "fileContentBase64": "{{ $output.runAudit.csvBase64 }}",
  "channelId": "C08COMPLIAN",
  "title": "Nightly Audit Results — {{ $now | date:'yyyy-MM-dd' }}"
}