Skip to main content

App Upload

Uploads a file from the local file system to a remote location. Currently, it is used for uploading a file generated from the flow to be downloaded later via the Robomotion Apps run history tab.

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 ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • Local File Path - Path of the local file to upload

Output

  • Public URL - URL of the uploaded application accessible to everyone. This output is generated if only Public option is selected.

Options

  • Public - Make the uploaded file publicly accessible or private if unchecked. Default is false (private).
  • Scope - Determines the file storage scope. Available options:
    • Run Scope (default) - File is associated with the current run
    • Session Scope - File is associated with the session
    • User Scope - File is associated with the user
    • Application Scope - File is associated with the application
  • Encryption - File encryption method. Available options:
    • None (default) - No encryption
    • Session Key - Encrypt using the session key
    • Custom AES Key - Encrypt using a custom AES key from vault
  • AES Key - The AES key credential from vault (required when using Custom AES Key encryption)
  • Remote File Path - Optional custom path/name for the file in remote storage

How It Works

The App Upload node uploads files from the local filesystem to Robomotion's cloud storage, making them accessible through the Robomotion Apps interface. The execution follows these steps:

  1. Delay Before - Waits for the specified delay before execution (if configured)
  2. Connection Validation - Ensures connection to Robomotion application service is established
  3. Path Validation - Validates that the local file path is not empty and the file exists
  4. Remote Path Handling - Uses provided remote path or generates one automatically
  5. Scope Determination - Sets the storage scope (defaults to "run_scope" if not specified)
  6. Encryption Setup - If encryption is enabled:
    • For "session_key": Retrieves the session ID from the message
    • For "custom_aes_key": Retrieves the AES key from the vault
  7. Public/Private Validation - Ensures public files are not encrypted (incompatible)
  8. File Upload - Uploads the file to Robomotion storage using the App Upload API
  9. URL Generation - If public, generates and returns a public URL for the uploaded file
  10. Delay After - Waits for the specified delay after execution (if configured)

The uploaded file becomes available in the Robomotion Apps run history or can be downloaded via App Download node.

Requirements

  • Robomotion Deskbot - This node only works with Robomotion Deskbot
  • Application Context - Must be running within a Robomotion App instance
  • App In Node - Requires an App In node earlier in the flow to establish context
  • File Exists - The local file must exist at the specified path
  • Read Permissions - Read permissions for the local file
  • Network Connection - Active connection to Robomotion service

Error Handling

Error CodeDescriptionCommon Cause
Core.Application.AppUpload.ErrOnCreateConfiguration parse errorInvalid node configuration or corrupted flow
Core.Application.AppUpload.ErrOnConnectConnection errorFailed to connect to Robomotion application service
Core.Application.AppUpload.ErrOnMessageMessage parse errorInvalid input message format
Core.Application.AppUpload.InvalidMessageInvalid messageLocal or remote path cannot be retrieved
Core.Application.AppUpload.InvalidTypeInvalid typeLocal file path is empty
Core.Application.AppUpload.InvalidSessionSession not foundSession ID is invalid or expired
Core.Application.AppUpload.ErrCredentialsCredentials errorAES key credentials are invalid or cannot be retrieved
Core.Application.AppUpload.ErrPublicPublic file encryption errorAttempting to make an encrypted file public
Core.Application.AppUpload.UploadMediaUpload failedFile upload operation failed
Core.Application.AppUpload.OutputMarshalOutput marshalling errorFailed to serialize output message

Usage Examples

Example 1: Upload Private Report

Upload a generated report to be downloaded later:

Local File Path: C:\Reports\monthly_report.pdf
Public: false
Scope: Run Scope
Encryption: Session Key

The report will be available in the run history for download.

Example 2: Upload Public File

Upload a file and get a public URL:

Local File Path: {{outputFilePath}}
Public: true
Scope: Application Scope
Encryption: None

Returns a public URL that can be shared with anyone.

Example 3: Upload with Custom Encryption

Upload a sensitive file with custom encryption:

Local File Path: /data/sensitive_data.csv
Remote File Path: encrypted/data_{{timestamp}}.csv
Public: false
Scope: User Scope
Encryption: Custom AES Key
AES Key: {{myAESKey}}

File is encrypted and stored securely with a custom path.

Example 4: Upload Screenshot

Upload a screenshot from automation:

Local File Path: {{screenshotPath}}
Remote File Path: screenshots/{{runID}}_{{timestamp}}.png
Public: false
Scope: Run Scope
Encryption: None

Organizes screenshots by run with timestamps.

Usage Notes

  • Public vs Private - Public files get a shareable URL; private files require authentication
  • Encryption Incompatibility - Public files cannot be encrypted (will cause an error)
  • Scope Persistence - Different scopes determine how long files are retained
  • Default Scope - If scope is not specified, defaults to "run_scope"
  • Remote Path - If not specified, uses the original filename
  • File Size - Large files may take time to upload; consider timeout settings
  • Automatic Cleanup - Files may be cleaned up based on retention policies for each scope

Tips

  1. Choose Appropriate Scope - Use run scope for temporary files, application scope for persistent files
  2. Public URLs - Only use public for files that don't contain sensitive information
  3. Encryption for Sensitive Data - Always encrypt files containing sensitive information
  4. Custom Paths - Use remote paths to organize files by date, type, or category
  5. Variables for Paths - Use variables to construct dynamic file paths
  6. Verify Upload - Check that the file exists before uploading to avoid errors
  7. File Naming - Include timestamps or unique IDs in filenames to avoid conflicts
  8. Test Downloads - After uploading, test that files can be downloaded correctly
  • App Download - For downloading files from Robomotion storage
  • App In - Required to establish the application context
  • App Out - For sending the public URL in the final response