Create variables via prompt

Using Co-Pilot for Automators, developers can specify the value and map a variable with a natural language prompt.

Co-Pilot for Automators assists development with creating variables in two ways. First, developers can send a single prompt with instructions for the properties of one or multiple variables to create them to specifications. Second, a variable is created and mapped automatically to any action that requires a variable, unless an existing variable is referenced in the prompt. A default naming convention is used for any variables created automatically.

Instructions for a prompt to create variables

Create a new variable.
Properties like the name, type of variable, and how the variable should be used (input, output, constant) are recognized in your prompt. Existing variables can then be referenced by another prompt and mapped to an existing action.
Example:
  1. Create an input string variable named Var1 and assign it the value "Hello, world!"
  2. Set the message box to display Var1.
Create variables with unique properties.
Support is provided for variables such as Table, and Session type that might have unique properties. Ensure you include the complete set of properties for these variable types in the prompt. For table type variables the dimensions and a default cell value can be specified in the instruction.
Examples:
  • Create a terminal session variable named pSessTerminal.
  • Create a 3x4 table variable with default value 0, named pTableVar1.

Variables dependent on Control Room files are supported, such as bot, form, process, and API Tasks. See, Add existing repository file via prompt

Automatically create variables

Co-Pilot for Automators helps developers focus on automation results and the operations of actions by helping with some of the tedious work of variable creation. If a variable does not exist and one is needed for the action described by a prompt, a variable is automatically created and mapped to the action requiring it. When variables are created this way a standard naming convention is applied, determined by the type of variable (pBool, pDict, pStr). When ready, the developer can then manually edit any variables to set the value and any other properties.

Example: Add a Prompt to the path of the folder.

Credential variables

Credential variables are recognized and can be added via prompt in the Bot editor. They are unique variables that secure the sensitive values they represent as a file saved in the Control Room repository. Credential variables have three layers and multiple attributes set when created. Your instruction should describe these to accurately call the variable and add it to the automation.
  • Locker name
  • Credential name
  • Attribute: username, password, Client ID, etc.

Learn more about credential variables in the following topic. See, Credentials and credential variables in the Bot editor.