Skip to main content

Upload File

Creates a file upload dialog in chat interfaces, allowing users to upload files.

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

  • ID - The unique identifier for the file upload dialog.
  • Directory - The directory path where uploaded files will be saved.

Options

  • Format - The file format filter for uploads. Default is ".*" (all files).
  • Files Limit - The maximum number of files that can be uploaded. Default is 1.

Output

  • Payload - The response object containing information about the file upload.
  • Files - The list of file paths for the uploaded files.

How It Works

The Upload File node creates a file upload interface in chat interfaces. When executed, the node:

  1. Creates a file upload dialog with the specified ID and options
  2. Displays the upload dialog in the chat interface
  3. Waits for user to select and upload files
  4. Saves the uploaded files to the specified directory
  5. Returns payload information and file paths

Requirements

  • A valid chat interface or messaging platform that supports file uploads
  • Proper directory permissions for saving uploaded files
  • Valid file format specifications if using format filtering

Error Handling

The node will return specific errors in the following cases:

  • Invalid or missing ID
  • Invalid directory path
  • Insufficient permissions to save files
  • Communication errors with the messaging platform
  • File format does not match the specified filter
  • Exceeded files limit

Usage Notes

  • The file upload dialog allows users to select files from their device
  • The Format option can restrict uploads to specific file types
  • The Files Limit option controls how many files can be uploaded at once
  • Uploaded files are automatically saved to the specified directory
  • The payload output contains metadata about the uploaded files
  • The files output provides the actual file paths of the saved files
  • This node is useful for collecting documents, images, or other files from users