Skip to main content

File Upload

Uploads a file to a Slack channel.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Client Id - The unique identifier for the Slack client connection obtained from the Connect node.
  • Channel Id - The ID of the Slack channel where the file will be uploaded.
  • File Path - The local file system path to the file that will be uploaded.

Output

  • File Id - The unique identifier of the uploaded file in Slack.

How It Works

The File Upload node uploads a file from the local file system to a specified Slack channel. When executed, the node:

  1. Retrieves the Client Id, Channel Id, and File Path from the inputs
  2. Validates the Client Id by checking if a connection exists
  3. Ensures the File Path and Channel Id are not empty
  4. Gets the file size information from the local file system
  5. Uploads the file to Slack using the UploadFileV2 API method
  6. Returns the File Id of the uploaded file as output

Requirements

  • A valid Slack client connection (Client Id from the Connect node)
  • Valid file path to an existing file on the local file system
  • Valid Slack channel ID where the bot has permission to upload files
  • Sufficient permissions for the bot to upload files to the specified channel

Error Handling

The node will return specific errors in the following cases:

  • Invalid Client Id that doesn't correspond to an existing connection
  • Empty or invalid File Path
  • Empty or invalid Channel Id
  • File not found at the specified path
  • Insufficient permissions to upload files to the channel
  • Slack API errors during the upload process

Usage Notes

  • The file must exist on the local file system where the automation is running
  • The bot must have the necessary scopes (files:write) to upload files
  • Large files may take longer to upload
  • The returned File Id can be used in other Slack nodes that require a file reference
  • The file name in Slack will be the same as the original file name