Upload File
Uploads a file from the local filesystem to Dropbox.
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.
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 client identifier returned from the Connect node.
- Dropbox Path - Path in Dropbox where the file will be uploaded (without leading slash).
- File Path - Local filesystem path to the file to upload.
How It Works
The Upload File node transfers a file from your local filesystem to Dropbox. When executed, the node:
- Validates the required inputs (Client ID, Dropbox Path, and File Path)
- Retrieves the access token using the provided Client ID
- Opens the local file for reading
- Prepends "/" to the Dropbox path as required by the Dropbox API
- Uploads the file to Dropbox at the specified path
- Closes the local file handle
Path Format
Dropbox Path:
- Should be provided without a leading slash
- Should include the filename
- The node automatically adds the leading "/" for Dropbox API compatibility
- Examples:
- Input:
documents/report.pdf→ API uses:/documents/report.pdf - Input:
photos/vacation.jpg→ API uses:/photos/vacation.jpg
- Input:
Local File Path:
- Can be an absolute or relative path
- Must point to an existing file
- Examples:
/home/user/documents/report.pdfC:\Users\User\Documents\report.pdf./temp/data.csv
Requirements
- A valid Dropbox connection (using the Connect node)
- The local file must exist and be readable
- Write permissions for the destination Dropbox path
- The destination parent folder must exist in Dropbox
- Sufficient Dropbox storage space
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Client ID
- Empty Dropbox Path
- Empty File Path
- Local file does not exist or cannot be opened
- Insufficient permissions to read the local file
- Parent folder does not exist in Dropbox
- Insufficient Dropbox storage space
- Network connection issues during upload
- Dropbox API errors
Usage Notes
- If a file already exists at the destination, it will be overwritten
- File metadata (creation date, permissions) is not preserved
- Large files may take time to upload depending on network speed
- Binary files (images, videos, PDFs) are handled correctly
- File streams are used for efficient memory usage
- Upload progress is not reported (operation blocks until complete)
Example 1: Upload a Report
Upload a generated PDF report to Dropbox:
Inputs:
- Client ID: (from Connect node)
- Dropbox Path:
reports/2024/monthly_report.pdf - File Path:
/home/user/output/report.pdf
Result: The local file is uploaded to /reports/2024/monthly_report.pdf in Dropbox
Example 2: Upload to Root Directory
Upload a file to the root of Dropbox:
Inputs:
- Client ID: (from Connect node)
- Dropbox Path:
backup.zip - File Path:
./backup.zip
Result: The file is uploaded to /backup.zip in Dropbox root
Example 3: Upload with Different Name
Upload a file and rename it in Dropbox:
Inputs:
- Client ID: (from Connect node)
- Dropbox Path:
documents/final_report.pdf - File Path:
./temp/draft_123.pdf
Result: The local draft_123.pdf is uploaded as final_report.pdf in Dropbox
Example 4: Upload with Timestamp
Upload a file with a timestamped name:
Inputs:
- Client ID: (from Connect node)
- Dropbox Path:
backups/database_2024-03-15.sql - File Path:
/var/backups/database.sql
Result: The backup is uploaded with a date-stamped filename
Common Use Cases
- Uploading generated reports or exports
- Backing up local files to cloud storage
- Sharing files by uploading to shared Dropbox folders
- Archiving processed data files
- Uploading scraped or downloaded content
- Syncing local changes to Dropbox
- Uploading log files for analysis
- Storing automation outputs
Best Practices
- Verify the local file exists before uploading (check file existence)
- Ensure the Dropbox destination folder exists (use CreateFolder if needed)
- Use descriptive filenames for uploaded files
- Include timestamps for versioning when appropriate
- Handle upload errors appropriately with error handling
- Consider file size before uploading to avoid timeouts
- Clean up local files after successful upload if they're temporary
- Use absolute paths for clarity in production environments
Pattern: Generate and Upload Report
Create a report and upload it to Dropbox:
Generate report (Excel, PDF, etc.)
↓
Save to local file
↓
UploadFile (upload to Dropbox)
↓
If upload successful
└─ Delete local file (cleanup)
Pattern: Batch Upload
Upload multiple files from a directory:
List local directory files
↓
Loop through each file
├─ Set dropbox_path = "uploads/" + filename
├─ Set local_path = local_directory + "/" + filename
├─ UploadFile
└─ Log "Uploaded: {filename}"
Pattern: Upload with Folder Creation
Ensure destination folder exists before uploading:
Set folder_path = "reports/2024"
↓
Try
└─ CreateFolder (folder_path)
Catch
└─ Log "Folder already exists or created"
↓
UploadFile (to folder_path)
Pattern: Conditional Upload
Upload only if file doesn't exist in Dropbox:
Try
└─ FileStat (check if file exists in Dropbox)
Catch (file doesn't exist)
└─ UploadFile
↓
If FileStat succeeded
└─ Log "File already exists, skipping upload"
Pattern: Backup with Versioning
Create versioned backups:
Get current_timestamp
↓
Set backup_name = "backup_" + current_timestamp + ".zip"
↓
Set dropbox_path = "backups/" + backup_name
↓
UploadFile
↓
Log "Backup created: {backup_name}"
Tips
- Use variables for dynamic Dropbox paths based on dates or metadata
- Implement retry logic for network failures
- Log successful uploads for audit trails
- Verify file size before uploading large files
- Consider compression for large text files before uploading
- Use descriptive folder structures for organization
- Test uploads with small files first when automating
- Monitor Dropbox storage quota in long-running automations
Performance Considerations
- Upload speed depends on network bandwidth
- Large files may take significant time to upload
- Multiple simultaneous uploads may impact performance
- Consider implementing upload queues for many files
- File streaming is used for efficient memory usage
- No client-side compression is applied automatically
Handling Large Files
For large file uploads:
- Ensure stable network connection
- Consider timeout settings for very large files
- Implement progress logging
- Use error handling and retry logic
- Monitor available Dropbox storage
- Consider splitting very large files
File Overwrite Behavior
- If a file exists at the destination path, it will be overwritten
- No warning is given before overwriting
- Previous versions may be available in Dropbox version history
- To avoid overwriting, check file existence first with FileStat
- Consider using versioned filenames to preserve history
Error Recovery
If an upload fails:
- Verify the local file exists and is readable
- Check available Dropbox storage space
- Ensure parent folder exists in Dropbox
- Verify network connectivity
- Check Dropbox access token permissions
- Review API rate limits
- Implement retry logic for transient failures
Security Considerations
- Ensure uploaded files don't contain sensitive data unencrypted
- Use appropriate Dropbox folder permissions
- Consider encrypting sensitive files before upload
- Implement audit logging for compliance requirements
- Clean up temporary files containing sensitive data after upload
- Verify file permissions after upload if needed
Integration with Other Nodes
Upload File works well with:
- CreateFolder: Ensure destination folder exists
- FileStat: Check if file exists before uploading
- DeleteFile: Clean up old versions after uploading new ones
- Local file operations: Generate content before uploading
- MoveFile: Organize uploaded files into folders
- ListFiles: Verify upload by listing directory contents
Supported File Types
All file types are supported:
- Documents (PDF, DOCX, XLSX, etc.)
- Images (JPG, PNG, GIF, etc.)
- Videos (MP4, AVI, MOV, etc.)
- Archives (ZIP, TAR, GZ, etc.)
- Data files (CSV, JSON, XML, etc.)
- Text files (TXT, LOG, etc.)
- Binary files
- Any other file type
Upload Limits
Be aware of Dropbox limitations:
- File size limits depend on your Dropbox plan
- API rate limits may apply for many uploads
- Storage quota limits on your account
- Network timeouts for very large files
Verifying Upload Success
To verify an upload was successful:
UploadFile
↓
FileStat (check uploaded file)
↓
If stats.size matches local file size
└─ Log "Upload verified"
Else
└─ Log "Upload verification failed"
Common Upload Patterns
Daily backup:
Create backup file
↓
Set date_stamp = current_date
↓
UploadFile (to backups/{date_stamp}/backup.zip)
Processed file upload:
Download file from source
↓
Process file
↓
UploadFile (upload processed version)
↓
Delete local files (cleanup)
Multi-source aggregation:
Collect data from multiple sources
↓
Generate combined report
↓
UploadFile (upload to shared folder)
↓
Notify team members