Skip to main content

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.
info

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:

  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 Retrieval - Retrieves the remote file name and local download folder path from input variables
  4. Path Validation - Validates that both paths are not empty
  5. 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
  6. File Download - Downloads the file from remote storage to the local folder using the Robomotion App Download API
  7. Decryption - If applicable, decrypts the downloaded file using the specified key
  8. 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 CodeDescriptionCommon Cause
Core.Application.AppDownload.ErrOnCreateConfiguration parse errorInvalid node configuration or corrupted flow
Core.Application.AppDownload.ErrOnConnectConnection errorFailed to connect to Robomotion application service
Core.Application.AppDownload.ErrOnMessageMessage parse errorInvalid input message format
Core.Application.AppDownload.InvalidPathInvalid file pathRemote or local path is invalid or malformed
Core.Application.AppDownload.InvalidTypeEmpty path errorRemote or local path is empty
Core.Application.AppDownload.InvalidSessionSession not foundSession ID is invalid or session has expired
Core.Application.AppDownload.ErrCredentialsCredentials errorAES key credentials are invalid or cannot be retrieved
Core.Application.AppDownload.DownloadErrDownload failedFile download operation failed
Core.Application.AppDownload.SetPathOutput path errorFailed to set the output file path variable
Core.Application.AppDownload.OutputMarshalOutput marshalling errorFailed 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

  1. Create Directory First - Ensure the local download folder exists before using this node
  2. Use Variables - Use variables for file names and paths to handle dynamic file downloads
  3. Error Handling - Enable "Continue On Error" when downloading optional files
  4. Scope Selection - Choose the appropriate scope based on how long the file needs to be available
  5. Encryption Keys - Store AES keys securely in Robomotion Vault, not in plain text
  6. Session Context - This node requires a valid session from App In node
  7. File Validation - Validate the downloaded file exists before processing it
  8. Path Separators - Use the correct path separators for your operating system (\ for Windows, / for Unix/macOS)
  • 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