FlowmageDocs

Upload file

BetaChanges data

Uploads a file to Slack and shares it in a channel or thread.

Settings

SettingWhat it is
ConnectionRequiredThe Slack connection the step signs in with.
File nameRequiredThe file's name, extension included. Pick the file, then paste its base64 below.
File contentsRequiredBase64 of the file — {{ file("name").base64 }}. Uploads over the "Use fixed IP address" lane are unverified; leave that toggle off for this node.
Share it inA channel id. Leave it empty to upload the file without posting it anywhere — it then only exists in Slack's file list.
Reply to (thread timestamp)text
Titletext
Message with the filePosted above the file in the channel.
Code snippet languageOnly for a text snippet — it decides how Slack highlights it.
Description for screen readerstext
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `slack`)
nametexta file name, listed in `requires.files`
contentBase64textits `{{ }}` must give a string
channelIdtexta value from the vendor's own list
threadTstextits `{{ }}` must give a string; used when `channelId` is not ""
titletextits `{{ }}` must give a string
initialCommenttext
snippetTypetext
altTexttextits `{{ }}` must give a string

Output

FieldType
fileIdstring
fileobject
permalinkOpen in Slackstring
Sample output, and the expression for each field
  • file
    • id"F0123ABCD"
    • name"report.pdf"
  • fileId"F0123ABCD"
  • permalink"https://example.slack.com/files/F0123ABCD"

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "altText": "",
    "channelId": "",
    "connection": "<connection id>",
    "contentBase64": "<file contents>",
    "initialComment": "",
    "name": "<file name>",
    "snippetType": "",
    "threadTs": "",
    "title": ""
  },
  "label": "Upload file",
  "type": "slack.uploadFile",
  "version": 1
}