While the primary tutorial introduced variables as simple storage, intermediate automation requires a deeper understanding of how data Flows. Variables act as the "connective tissue" within a process—translating a raw string from a website into a numeric value for calculation, or organizing scattered items into a structured Data Table.
Data Containers in Octoparse AI
Octoparse AI defines specific data containers optimized for automation. Understanding these is key to choosing the right tool for your data:
Data Table: A structured 2D container. Use this as your internal database to store complex records before exporting to Excel. Access via
tableName[row][column].List: An ordered sequence of values. Essential for Looping operations where you need to process items one by one. Access via
listName[index].Dictionary: A Key-Value collection. Use this to store "Objects" (e.g., a user profile) so you can retrieve data by name (e.g.,
user["email"]) instead of position.String & Number: The basic building blocks for text processing and mathematical calculations.
Boolean: The logical foundation (
True/False) used to control If/Else branching.
System Variables: Built-in Intelligence
System Variables provide direct access to the execution environment without manual setup. They are pre-defined and read-only.
When to use them: Instead of manually calculating timestamps or hard-coding file paths, use system variables for tasks such as:
Dynamic File Naming: Using the current date/time to ensure every exported file has a unique timestamp.
Path Portability: Using the "Desktop" or "Documents" path so your workflow runs correctly on different computers without manual path adjustments.
Execution Auditing: Retrieving the name of the specific Bot or Trigger that started the process for logging purposes.
System Variable | Type | Description |
CurrentDateTime | DateTime | Current system date and time (yyyyMMddhhmmss). Ideal for unique timestamps. |
Desktop | String | Absolute path to the current user's Desktop folder. |
Downloads | String | Absolute path to the current user's Downloads folder. |
Documents | String | Absolute path to the current user's Documents folder. |
Pictures | String | Absolute path to the current user's Pictures folder. |
User | String | Path to the current user's Profile directory. |
Roaming | String | Path to the AppData\Roaming folder. |
Temp | String | Path to the system's temporary folder. |
Windows | String | Path to the Windows system folder (usually C:\Windows). |
CurrentAppName | String | The name of the automation application currently running. |
BotName | String | The name of the RPA bot or executor performing the task. |
ExecutionUsername | String | The OS username under which the process is running. |
TriggerName | String | The name of the trigger (e.g., Schedule) that started the flow. |
TriggerTime | DateTime | The specific time the trigger was activated. |
Custom Variables: Design Logic Evolution
The transition from v1.x to v2.x reflects a move toward more intuitive, usage-based management:
v2.x Logic (Usage-based):
Flow Variables: A unified pool of all internal data, regardless of how it was created.
Input Variables: Specifically flagged as "External entry points" to receive data when the process starts.
v1.x Logic (Source-based): Users had to distinguish between Custom Variables (manually created) and Flow Variables (output by instructions).
Advanced Rules: Indexing and Selection
To avoid common workflow breaks, intermediate developers must adhere to these indexing rules:
The Zero-Base Rule: In Octoparse AI, all collections start at index 0.
First item in a List:
myList[0]First cell in a Table:
myTable[0][0]
Selection Strategy:
Need to store rows of data? → Data Table
Need a simple queue of items? → List
Need to store attributes of a single entity? → Dictionary
