Upload File
Uploads a file from the local filesystem to a specified folder in pCloud.
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 Login node.
- File Path - The absolute or relative path to the local file to upload.
- Folder ID - The pCloud folder ID where the file will be uploaded. Use 0 for the root folder.
- Remote File Name - The name for the file in pCloud (can be different from the local file name).
How It Works
The Upload File node transfers a file from your local filesystem to pCloud. When executed, the node:
- Validates the Client Id
- Validates the local file path and opens the file
- Validates the remote file name
- Retrieves the folder ID (defaults to 0 if not specified)
- Retrieves the authenticated pCloud client
- Uploads the file to the specified folder
- Closes the local file handle
Requirements
- An active pCloud connection (Client Id from Login node)
- Read access to the local file
- Valid folder ID in pCloud (or 0 for root)
- Sufficient storage space in your pCloud account
- Appropriate permissions for the target folder
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Client Id
- Empty or invalid file path
- Local file not found or cannot be opened
- Empty remote file name
- Invalid folder ID
- Upload failure due to network issues
- Insufficient storage space in pCloud
- Permission denied on target folder
Usage Notes
- The File Path can be absolute or relative to the robot's working directory
- The Folder ID defaults to 0 (root folder) if not specified
- The Remote File Name can be different from the local file name
- If a file with the same name exists in the target folder, it will be overwritten
- Large files are automatically handled by the pCloud API
- The upload progress is not reported by this node
Finding Folder IDs
To upload files to specific folders, you need the folder ID:
- Root folder: ID is 0
- Other folders: Use pCloud's web interface or API to find folder IDs
- Folder IDs are numeric values assigned by pCloud
Best Practices
- Always validate that the local file exists before uploading
- Use meaningful remote file names for easy identification
- Handle upload errors appropriately, especially for large files
- Consider using unique file names to avoid accidental overwrites
- For batch uploads, use loop nodes with error handling
- Clean up local temporary files after successful uploads
Example: Upload a Report
Upload a generated report to pCloud's root folder:
Inputs:
- Client Id: (from Login node)
- File Path: "/home/user/reports/monthly_report.pdf"
- Folder ID: 0
- Remote File Name: "Monthly_Report_January_2024.pdf"
The file will be uploaded to the root folder with the specified name.
Example: Upload to Specific Folder
Upload an invoice to a specific folder:
Inputs:
- Client Id: (from Login node)
- File Path: "/data/invoices/INV-001.pdf"
- Folder ID: 123456
- Remote File Name: "Invoice_001.pdf"
The file will be uploaded to folder ID 123456.
Example: Upload Multiple Files
To upload multiple files, combine with a Loop node:
- Set Variable - Create array of file paths
- For Each - Loop through files
- Upload File - Upload each file
- Get Public Link - Generate sharing link (optional)
Common Automation Scenarios
Automated Backup:
- Use scheduled triggers to upload backups regularly
- Organize files by date in folder names
- Upload database dumps, configuration files, or reports
Document Processing:
- Download files from email attachments
- Process or convert documents
- Upload processed files to pCloud
- Share links with recipients
Data Collection:
- Scrape data from websites
- Generate CSV or Excel reports
- Upload reports to pCloud for archiving
- Create public links for sharing
Troubleshooting
File Not Found Error:
- Verify the file path is correct
- Check file permissions
- Ensure the file exists before upload
Upload Fails:
- Check your internet connection
- Verify you have sufficient pCloud storage space
- Ensure the folder ID is valid
- Check if folder permissions allow uploads
Client ID Invalid:
- Ensure the Login node executed successfully
- Verify the Client Id is being passed correctly
- Check if the connection was established with the correct region