System Variables

In OL Connect Workflow, system variables (prefixed with a %) can be inserted into scriptable fields to retrieve and insert job, process, and date-related values. They are commonly used to create timestamps, build date-based batch strings, or return information about the current job file.

In OL Connect Automate, the same information is exposed differently: either through msg properties or via JSONata expressions. The table below maps OL Connect Workflow’s system variables to their equivalents in OL Connect Automate.

  • File-related variables are typically available under msg.file when using the folder capture or folder listing nodes.

  • Date/time values can be generated with JSONata’s $moment() functions.

For example, the following JSONata expression inserts a formatted date string:

$moment().format("YYYYMMDD_hhmmss")

This outputs a value like:

20240708_043210

The image below illustrates how a Change node can be used to insert a system-variable equivalent into a custom message property. In this example, the JSONata expression shown above is evaluated to generate a formatted timestamp, which is then stored in msg.myTimeStamp.

Setting msg.myTimeStamp using a JSON expression.

For more details, see JSONata for dates and timestamps and other JSONata expression samples.

System Variable Mapping

Workflow Variable Description Automate Equivalent

%o

Original file name with file extension.

msg.file.basename: Automatically populated by the Folder Capture node under msg.file.

{

"path": "C:\\workspace_olca\\commingling\\trigger-file\\in\\20250815_043836\\20250815_043836.trigger",

"folder": "C:\\workspace_olca\\commingling\\trigger-file\\in\\20250815_043836\\",

"basename": "invoice.xml",

"name": "invoice",

"ext": "xml",

"size": 2,

"date": "2025-08-15T14:38:36.810Z",

"event": "create"

}

When using the Folder Listing node set Output option to Array of Objects.

%a

Job file last modified date.

See %o: msg.file.date.

%c

Content of the job file in its original format.

Use read file node to read the data into msg.payload.

%F

Job file path and name.

See %o: msg.file.path.

%f

Job file name including the file extension.

See %o: msg.file.basename.

%z

Job file size in bytes.

See %o: msg.file.size.

%O

Original file name without extension.

See %o: msg.file.name.

%y

Current year.

JSONata expression:

$moment().format("YYYY") or $moment().year()

%m

Current month (numeric).

JSONata expression:

$moment().format("MM") or $moment().month()

%M

Current month (text).

JSONata expression: $moment().format("MMM")

%d

Current day (numeric).

JSONata expression:

$moment().format("d") or $moment().day()

%D

Current day (text).

JSONata expression:

$moment().format("dddd")

%I

Current day (short text).

JSONata expression:

$moment().format("ddd")

%h

Current hour.

JSONata expression:

$moment().hour() or $moment().format("hh")

%n

Current minute.

JSONata expression:

$moment().minute() or $moment().format("mm")

%s

Current second.

JSONata expression:

$moment().second() or $moment().format("ss")

%v

Current millisecond.

JSONata expression:

$moment().format("SS")

%r

Run mode

 

%u

Unique 13-char.

JSONata or function node:

$join([0..16].$substring('ABCDEFGHIJKLMNOPQRSTUVWXYZ', $floor($random() * 27),1))

%U

Unique 36-char.

Create GUIDs via the function node by adding a module like uuid, see Generating uuids.

%t

Current temp folder.

 

%e

Current metadata file name.

 

%E

Current metadata path.

 

%w

Current process name.

Not available, manually set a property via change node like msg.processName or msg.flowName.

%i

Current loop iteration index.

Within a split/join combination: msg.parts.index