Actions44
- Channel Actions
- File Actions
- Message Actions
- Reaction Actions
- Star Actions
- User Actions
- User Group Actions
File → Upload
AI-generatedSummary
Upload a file to Slack by specifying its content either as plain text or from binary data within the workflow. Optionally customize the upload by defining the destination channel(s), file name, title, an initial comment, and thread timestamp for replies.
Inputs
- binaryData — Choose true to upload the file content from a binary property in the input data, or false to provide file content as a text string.
- fileContent — The file content as a text string, used when binaryData is false.
- binaryPropertyName (required) — The name of the binary field containing the file data, used when binaryData is true.
- options — Optional settings including:
- Channel Name or ID (single channel) or Channel Names or IDs (multiple channels) to send the file to.
- File Name to set the file's name in Slack.
- Initial Comment as message text introducing the file.
- Thread Timestamp to upload the file as a reply in a specific thread.
- Title of the file.
Output shape
An object containing details of the uploaded file as returned by Slack's API.
Supports uploading a single file per execution. Channel(s) must be specified in options to share the file. The returned data includes file metadata as per Slack's response to file upload.
Examples
Example 1: Upload binary file data from 'data' property to a specific Slack channel with a comment and custom file name.
binaryData=true, binaryPropertyName='data', options.channelId='C12345678', options.fileName='report.pdf', options.initialComment='Here is the monthly report.'
Example 2: Upload text content as a file to multiple channels with a title.
binaryData=false, fileContent='Hello World content', options.channelIds=['C12345678','C87654321'], options.title='Greeting Text'