Skip to main content

Send Slack File

The Send Slack File activity sends a file to a Slack channel as part of your workflow.

Purpose​

Use the Send Slack File activity to:

  • Share report outputs with team channels
  • Distribute generated files to stakeholders
  • Send workflow results or exports
  • Automate file delivery to Slack

Prerequisites​

Slack Connection Required​

  • Must have a configured Slack connection (see Settings → Connections)
  • OAuth token must have files:write permission

File Source​

Files are typically generated by previous workflow activities, such as:

  • Report book results (PDFs, Excel files)
  • Exported data files
  • Generated documents

Configuration​

Connection Settings​

  • Slack Connection: Select a pre-configured Slack connection

Channel Settings​

  • Channel Name: The Slack channel to send to (e.g., "products")
  • Channel ID: Alternative to channel name

Message Settings (Optional)​

  • Message: Optional text message to accompany the file
  • Appears above the file in Slack
  • Can include workflow parameters

File Settings​

  • File Source: Select the file to send
  • Typically uses output from a previous workflow activity

Context Variable (Optional)​

  • Message Timestamp: Store the timestamp of the message with the file
  • Can be used to track the upload or read responses

File Source Options​

Report Book Result​

Most common use case - sending generated reports:

File Source: Report Book Result
└─ Select from previous Report Book activity output

Workflow File​

Files stored or generated within the workflow:

File Source: Workflow File
└─ Select from File Explorer or previous activity

Example Configurations​

Send Report PDF​

Slack Connection: Company Slack
Channel: reports
Message: Monthly report for {MonthName} - generated {GenerationDate}
File: Report Book Result (Monthly_Report.pdf)

Send Data Export​

Slack Connection: Company Slack
Channel: data-team
Message: Client data export - {RecordCount} records
File: Export Result (ClientData.xlsx)

Send Generated File with Timestamp​

Slack Connection: Company Slack
Channel: finance
Message: Financial summary for {Period}
File: Report Book Result (Finance_Summary.pdf)
Timestamp Context Key: FileUploadTimestamp

Common Use Cases​

Automated Report Distribution​

1. Generate Report Book (PDF/Excel)
2. Send Slack File
└─ Channel: reports
└─ File: Report Book Result
└─ Message: "{ReportName} for {Period}"

Data Export Delivery​

1. Export Data to File
2. Send Slack File
└─ Channel: data-exports
└─ File: Export File
└─ Message: "Daily export completed"

Error Logs​

1. Generate Error Report
2. Send Slack File
└─ Channel: alerts
└─ File: Error Log
└─ Message: "⚠️ Workflow errors for {Date}"

Scheduled Deliveries​

Workflow Schedule: Daily at 8 AM
└─ Generate Report
└─ Send Slack File
└─ Channel: morning-reports
└─ Message: "Good morning! Here's today's report."

Supported File Types​

Slack generally supports:

  • Documents: PDF, DOCX, TXT, MD
  • Spreadsheets: XLSX, CSV
  • Images: PNG, JPG, GIF
  • Archives: ZIP
  • Other: Most common file formats

Check Slack's current file size limits (typically 1 GB for free plans, may vary).

Message Formatting​

The accompanying message supports:

  • Plain text
  • Workflow parameters: {ParameterName}
  • Emojis: 📊 📈 📉
  • Simple formatting (Slack auto-detects URLs)

Note: For advanced markdown formatting, use Send Slack Message activity separately.

File Naming​

  • Files retain their original names from the source activity
  • Report Book Results use the report book's configured file name
  • Consider configuring meaningful file names in report book settings

Best Practices​

  • Clear Messages: Provide context about the file content
  • Appropriate Channels: Send to relevant team channels
  • Naming Convention: Use consistent, descriptive file names
  • Size Awareness: Be mindful of large files (consider compression)
  • Frequency: Avoid overwhelming channels with too many files
  • Test Channel: Test deliveries in a private channel first
  • Error Handling: Plan for file generation failures

Usage Pattern with Report Books​

Complete Report Delivery Flow​

1. Report Book Activity
└─ Generate: Monthly_Report
└─ Format: PDF
└─ Store Output: MonthlyReportFile

2. Send Slack File
└─ Connection: Company Slack
└─ Channel: management
└─ Message: "📊 Monthly Report - {MonthName} {Year}"
└─ File: MonthlyReportFile

3. Email Activity (parallel)
└─ Also send via email to external stakeholders

Context Variable Usage​

Store the message timestamp to:

  • Track successful uploads
  • Read responses about the file
  • Link multiple messages together
  • Implement approval workflows based on file reviews
Timestamp Context Key: ReportUploadTimestamp

Later activities can reference: {ReportUploadTimestamp}

Limitations​

  • One File per Activity: Sends one file at a time
  • File Size: Subject to Slack's file size limits
  • Source Dependency: File must be generated by a previous activity
  • No Direct Upload: Cannot upload files from external sources directly

To send multiple files:

  • Use multiple Send Slack File activities
  • Or combine files into a ZIP archive first

Troubleshooting​

File Not Appearing in Slack​

  • Verify OAuth token has files:write permission
  • Check bot is added to the target channel
  • Confirm file was successfully generated by previous activity
  • Review workflow execution log for errors
  • Verify file size is within Slack limits

Wrong File Sent​

  • Check file source configuration
  • Verify correct previous activity is referenced
  • Ensure file variable is populated

Channel Not Found​

  • Verify channel name is correct (case-sensitive)
  • Confirm bot is a member of the channel
  • Try using Channel ID instead of name

OAuth Token Setup​

Your IT team or Slack admin needs to add permissions:

Required Scopes:

  • files:write - Upload and send files
  • channels:read - Read channel information
  • chat:write - Post messages (for accompanying text)

Setup Steps:

  1. Go to Slack App settings
  2. Navigate to OAuth & Permissions
  3. Add Bot Token Scopes listed above
  4. Reinstall app to workspace
  5. Invite bot to target channels

Security Considerations​

  • Files uploaded to Slack are stored in Slack's systems
  • Consider data sensitivity before automated uploads
  • Review Slack's data retention policies
  • Monitor file sharing for compliance requirements
  • Restrict bot access to appropriate channels only
  • Consider encrypting sensitive files before upload

JSON Reference​

{
"discriminator": "SendSlackFileWorkflowActivity",
"activityId": "<uuid>",
"name": "Send Slack File",
"positionX": 0,
"positionY": 0,
"advanceRule": 2,
"dataSource": "MySlackConnection",
"channel": "reports",
"message": "Monthly report for {MonthName}",
"fileSystemPath": "/Reports/MonthlyReport.pdf",
"isMarkdown": false,
"responseTimestampContextKey": "FileUploadTimestamp"
}
PropertyTypeDescription
dataSourcestringCorresponds to the Slack Connection field. The name of the configured Slack data source.
channelstringCorresponds to the Channel Name field. The Slack channel to send the file to. Supports {variable} interpolation.
messagestringCorresponds to the Message field. Optional text message accompanying the file. Supports {variable} interpolation.
fileSystemPathstringCorresponds to the File Source field. The Una file system path of the file to upload.
isMarkdownbooleanWhen true, the message is formatted as Markdown; otherwise plain text.
responseTimestampContextKeystringCorresponds to the Message Timestamp context variable key. Workflow context key where the Slack message timestamp is stored after upload.

Alternative Approaches​

Large Files​

For very large files, consider:

  • Generating a download link instead
  • Using cloud storage (SharePoint, OneDrive)
  • Sending email with attachment
  • Compressing files before sending

External Recipients​

For recipients outside Slack:

  • Use Email activity instead
  • Or combine: Send Slack File to internal team, Email to external
  • Consider access controls and sharing permissions