Robot YAML configuration format

Data model

Generic data content description stating the mandatory items and data types:

├─ robot name                         [string | OPTIONAL]
├─ robot description                  [string | OPTIONAL]
├─ robot version                      [string | OPTIONAL]
├─ map of tasks                       [map(1..n) | MANDATORY]
│  └─ task name                       [object | MANDATORY]
│     └─ command                      [list of command elements | MANDATORY]
└─ conda configuration file           [path string | OPTIONAL]
├─ artifacts output path              [path string | MANDATORY]
├─ list of ignore files               [list<files string>(0..n) | OPTIONAL]
├─ list of paths to prepend to run environment PATH variable
│  └─ [list<path string>(0..n) | OPTIONAL]
└─ list of paths to prepend to run environment PYTHONPATH variable
   └─ [list<path string>(0..n) | OPTIONAL]

For a robot.yaml to be valid, it has to have:

  • At least one task defined and that must have a command defined
  • Artifacts output path defined

Examples

Minimal example

An example where you only have a single Robot Framework file to execute with minimal folder structure and no optional fields

tasks:
  Read Invoice Excel:
    command:
      - python
      - -m
      - robot
      - --report
      - NONE
      - --outputdir
      - output
      - --logtitle
      - Task log
      - tasks.robot

condaConfigFile: conda.yaml
artifactsDir: output
PATH:
  - .
PYTHONPATH:
  - .
ignoreFiles:
  - .gitignore

Full example with optional fields and comments to guide the use

name: RPA Challenge robot
description: Robot to execute RPA challenges at http://www.rpachallenge.com
version: 0.0.1
# You can define multiple tasks in one robot
tasks:
  # This is the name you will see in Robocorp Lab and Cloud.
  # Tip: Naming these as 'verbs' or actions that the robot can do, makes these easier to use.
  Execute Input Forms:
    # Command contains the executed command and it arguments
    # (The list format avoids problems with arguments that have spaces)
    command:
      - python
      - -m
      - robot
      - --report
      - NONE
      - --outputdir
      - output
      - --logtitle
      - Task log
      - tasks/

# Defines the place for your conda config file
condaConfigFile: conda.yaml

# Files added to this folder are sent to Robocorp Cloud as run artifacts
artifactsDir: output

# This controls the packaging of your robot to avoid any development files from being sent with your robot.
ignoreFiles:
  - .gitignore

# Paths defined here are prepended to the PATH environment variable
# for the duration of the execution.
PATH:
  - bin

# Paths defined here are prepended to the PYTHONPATH environment variable
# for the duration of the execution.
PYTHONPATH:
  - variables
  - libraries
  - resources

Script example

An example where you only have scripts to execute, you don't need RobotFramework and you have your environment setup.

tasks:
  Trigger start script:
    command:
      - my-trigger-script.bat
      # Add your command-line arguments in this list (the list avoids problems with spaces and brackets)
artifactsDir: output
PATH:
  - .
ignoreFiles:
  - .gitignore