Import Asset

Verb: import

Imports a file of the selected format.


import --name(String) --type(AssetTypes) --url(String) [--username(String)] [--password(String)] --content(String) [--extension(String)]


Script Designer Required AcceptedTypes Description
--name Name Required Text Name of the resource that should be imported.
--type Type Required AssetTypes Type of asset that should be used:
  • Audio
  • File
  • Grammar
  • Image
  • SQL Connection String
  • Terminal
  • Web Service
  • --url URL Only whenType is WebService Text Standard resource locator.
    Refers to the network address where a computer resource is located, such as a computer file, peripheral, or website.
    --username User Name Optional Text Login username if required.
    --password Password Optional Text User password for connection, if required.
    --content Content Only whenType is Audio, Image, File, ABNF Text Path to the file to be imported.
    From the given path, IBM RPA Studio gets the contents of the file and converts it to base64.
    --extension Extension Optional Text Extension of the file that should be imported.


    The Import Asset command is used to import a text file, and then the Export Asset command is executed to export the same file, returning its path.

    defVar --name success --type Boolean
    defVar --name filePath --type String
    // Imports a text file.
    import --name importedFile --type "File" --content V0RHIEF1dG9tYXRpb24= --extension ".txt"
    // Exports the imported text file.
    export --asset "${asset.importedFile}" success=success filePath=value
    logMessage --message "${filePath}" --type "Info"
    // Displays the path to the edited text.