Skip to main content

Delete File

Deletes a file from Slack using the file ID.

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.
  • File ID - The ID of the file to be deleted from Slack.

How It Works

The Delete File node removes a file from Slack using its file ID. When executed, the node:

  1. Retrieves the Client Id and File ID from the inputs
  2. Validates the Client Id by checking if a connection exists
  3. Ensures the File ID is not empty
  4. Calls the Slack API to delete the specified file

Requirements

  • A valid Slack client connection (Client Id from the Connect node)
  • The file ID of the file you want to delete
  • Appropriate permissions to delete files in the Slack workspace

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 ID
  • Slack API errors when attempting to delete the file

Usage Notes

  • The file will be permanently deleted from Slack
  • Make sure you have the correct file ID before executing this node
  • Only files that the bot has access to can be deleted
  • The bot must have the necessary permissions to delete files