App Download
Downloads a file from a remote location to a local folder. Currently, it is used for downloading files that are uploaded to the Robomotion Assistant chat session or from custom Applications developed to run from Robomotion Apps.
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 the Catch node is used.
Input
- Remote File Name - The name of the file to be downloaded from the remote location.
- Local Download Folder - The local folder path where the file will be downloaded.
Output
- File Path - The full path of the downloaded file.
Options
- Scope - Determines the file storage scope (e.g., session, user, application)
- Decryption - Encryption handling method. Available options:
- None (default)
- Session Key - Uses the session encryption key
- Custom AES Key - Uses a custom AES encryption key from vault
- AES Key - The AES key credential from vault (required when using Custom AES Key decryption)
How It Works
The App Download node downloads files from Robomotion's cloud storage to a local folder. This is primarily used in Robomotion Apps and Assistant sessions. The execution follows these steps:
- Delay Before - Waits for the specified delay before execution (if configured)
- Connection Validation - Ensures connection to Robomotion application service is established
- Path Retrieval - Retrieves the remote file name and local download folder path from input variables
- Path Validation - Validates that both paths are not empty
- Decryption Setup - If decryption is enabled:
- For "session_key": Retrieves the session ID from the message
- For "custom_aes_key": Retrieves the AES key from the vault
- File Download - Downloads the file from remote storage to the local folder using the Robomotion App Download API
- Decryption - If applicable, decrypts the downloaded file using the specified key
- Delay After - Waits for the specified delay after execution (if configured)
The node supports backward compatibility with versions before 24.2.0.
Requirements
- Robomotion Deskbot - This node only works with Robomotion Deskbot
- Application Context - Must be running within a Robomotion App or Assistant session
- Connection - Active connection to Robomotion application service
- Permissions - Write permissions to the local download folder
- Encryption - Valid AES key credentials if using custom decryption
Error Handling
| Error Code | Description | Common Cause |
|---|---|---|
Core.Application.AppDownload.ErrOnCreate | Configuration parse error | Invalid node configuration or corrupted flow |
Core.Application.AppDownload.ErrOnConnect | Connection error | Failed to connect to Robomotion application service |
Core.Application.AppDownload.ErrOnMessage | Message parse error | Invalid input message format |
Core.Application.AppDownload.InvalidPath | Invalid file path | Remote or local path is invalid or malformed |
Core.Application.AppDownload.InvalidType | Empty path error | Remote or local path is empty |
Core.Application.AppDownload.InvalidSession | Session not found | Session ID is invalid or session has expired |
Core.Application.AppDownload.ErrCredentials | Credentials error | AES key credentials are invalid or cannot be retrieved |
Core.Application.AppDownload.DownloadErr | Download failed | File download operation failed |
Core.Application.AppDownload.SetPath | Output path error | Failed to set the output file path variable |
Core.Application.AppDownload.OutputMarshal | Output marshalling error | Failed to serialize the output message |
Usage Examples
Example 1: Download Chat Attachment
Download a file uploaded to Robomotion Assistant chat:
Remote File Name: document.pdf
Local Download Folder: C:\Downloads\
Scope: session
Decryption: Session Key
This downloads the file to C:\Downloads\document.pdf.
Example 2: Download with Custom Encryption
Download an encrypted file using a custom AES key:
Remote File Name: {{fileName}}
Local Download Folder: /home/user/downloads/
Scope: user
Decryption: Custom AES Key
AES Key: {{myAESKey}}
The file will be decrypted using the specified AES key during download.
Example 3: Download to Temp Directory
Download to a temporary directory for processing:
Remote File Name: data.csv
Local Download Folder: {{tempDir}}
Scope: application
Decryption: None
Use a variable for the download location to make it dynamic.
Usage Notes
- Version Compatibility - The node supports both new (24.2.0+) and legacy versions with different parameter structures
- File Paths - Remote file names are relative to the application/session storage root
- Local Folders - The local download folder must exist; the node does not create directories
- File Naming - The downloaded file retains its remote file name in the local folder
- Encryption - Encrypted files are automatically decrypted during download when configured
- Session Scope - Files are typically scoped to the current session, user, or application
Tips
- Create Directory First - Ensure the local download folder exists before using this node
- Use Variables - Use variables for file names and paths to handle dynamic file downloads
- Error Handling - Enable "Continue On Error" when downloading optional files
- Scope Selection - Choose the appropriate scope based on how long the file needs to be available
- Encryption Keys - Store AES keys securely in Robomotion Vault, not in plain text
- Session Context - This node requires a valid session from App In node
- File Validation - Validate the downloaded file exists before processing it
- Path Separators - Use the correct path separators for your operating system (\ for Windows, / for Unix/macOS)
Related Nodes
- App Upload - For uploading files to Robomotion storage
- App In - For starting the application and establishing the session
- App Out - For sending responses back to the application