Nabrio Help
Nabrio Help

Getting Started

Nara Overview

Understanding Nara

Using Nara

Components

Template Expression

Miscellaneous

Nomenclature
Troubleshooting
Notice and DisclaimerEULA
NodesCommon functionalities

Template Expression

Template expressions let you generate text dynamically from runtime data.

Syntax Overview

Use double curly braces to evaluate an expression:

{{ expression }}

Expression rules:

  • Plain text outside {{ ... }} is returned as-is.
  • Function calls are space-separated: {{ functionName arg1 arg2 }}.
  • Use double quotes for arguments with spaces: {{ lowercase "HELLO WORLD" }}.
  • Nested calls use parentheses: {{ uppercase (lowercase "MiXeD") }}.
  • If an expression fails, output is rendered as: {{ERROR: ...}}.

Data Source

Most templates read values from JSON runtime data through jsonPointer.

Example runtime JSON:

{
	"project": {
		"name": "Nara",
		"version": 12,
		"active": true,
		"tags": ["vision", "flow"]
	},
	"node": {
		"id": "node-07"
	}
}

Data Function: jsonPointer

jsonPointer fetches a value from JSON (e.g. node output) using a JSON Pointer path.

{{ jsonPointer pointer }}
{{ jsonPointer pointer indent }}

Arguments:

  • pointer (required): JSON Pointer path, for example "/project/name".
  • indent (optional): integer indentation for pretty JSON output when target is object/array.

Behavior:

  • String result: returns string value.
  • Number result: converted to string.
  • Boolean result: returns true or false.
  • Null result: returns empty string.
  • Object/array result:
    • no indent or indent = 0: compact JSON string.
    • indent > 0: pretty-printed JSON.

jsonPointer Examples

  1. Read a string value:
Template: {{ jsonPointer "/project/name" }}
Output:   Nara
  1. Read a numeric value:
Template: {{ jsonPointer "/project/version" }}
Output:   12
  1. Read a boolean value:
Template: {{ jsonPointer "/project/active" }}
Output:   true
  1. Read an array (compact JSON):
Template: {{ jsonPointer "/project/tags" }}
Output:   ["vision","flow"]
  1. Read an array (pretty JSON):
Template: {{ jsonPointer "/project/tags" 2 }}
Output:
[
	"vision",
	"flow"
]
  1. Chain with other functions:
Template: {{ uppercase (jsonPointer "/project/name") }}
Output:   NARA
  1. Invalid path handling:
Template: {{ jsonPointer "/project/unknown" }}
Output:   {{ERROR: JSON pointer error: ...}}

jsonPointer and Data References (Flow runtime)

In flow execution, string values that match the internal data-reference prefix are resolved automatically:

  • Frame reference in idFrames -> converted to Base64 string.
  • Vector frame reference in idVFrames -> first frame converted to Base64.
  • This resolution is recursive for objects and arrays returned by jsonPointer.

Practical effect:

  • If JSON contains a data-reference token, jsonPointer can return encoded image content instead of the raw token.

Note

The exact reference prefix is internal (FlowNodeUtils::jsonDataRefKeyPrefix()) and may differ by runtime version.

String Functions

lowercase

Converts the first argument to lowercase.

{{ lowercase "Hello WORLD" }}

Output:

hello world

uppercase

Converts the first argument to uppercase.

{{ uppercase "Hello WORLD" }}

Output:

HELLO WORLD

capitalize

Uppercases only the first character of the first argument.

{{ capitalize "nara flow" }}

Output:

Nara flow

Padding Function

stringPad

Pads a string to target length.

{{ stringPad value targetLength padToken direction }}

Arguments:

  • value (required): source string.
  • targetLength (required): non-negative integer.
  • padToken (optional): token used for padding, default is single space.
  • direction (optional): start or end, default is start.

Examples:

{{ stringPad "7" 3 "0" "start" }}

Output:

007
{{ stringPad "ID" 6 "-" "end" }}

Output:

ID----
{{ stringPad "ABC" 8 "xy" "end" }}

Output:

ABCxyxyx

Errors:

  • Missing required args -> error.
  • Non-numeric length -> error.
  • Negative length -> error.
  • Invalid direction (not start or end) -> error.

Date and Context Functions

datetimeNow

Returns current local datetime.

{{ datetimeNow }}
{{ datetimeNow "ISO_EXT_DATE_TIME_MILLISEC" }}

Notes:

  • If no format is provided, default format is ISO_EXT_DATE_TIME_MILLISEC.
  • If format text is unknown, it falls back to the same default.

Example output:

2026-05-23T15:04:12.381

toolId

Returns current flow tool ID from runtime context.

{{ toolId }}

Example output:

tool-image-segmentation

nodeId

Returns current flow node ID from runtime context.

{{ nodeId }}

Example output:

node-07

Nested Expression Examples

{{ uppercase (jsonPointer "/project/name") }}
{{ stringPad (jsonPointer "/project/version") 4 "0" "start" }}
{{ capitalize (lowercase "NARA TEMPLATE") }}

Troubleshooting

  • Unknown function: ...
    • Function name is not registered in current runtime.
  • jsonPointer function requires at least one argument
    • Missing pointer path.
  • JSON pointer error: ...
    • Invalid path or path does not exist.
  • stringPad function requires a numeric length argument
    • Target length is not an integer.

DB Table Rows Read

Previous Page

Nomenclature

Next Page

On this page

Syntax OverviewData SourceData Function: jsonPointerjsonPointer ExamplesjsonPointer and Data References (Flow runtime)String FunctionslowercaseuppercasecapitalizePadding FunctionstringPadDate and Context FunctionsdatetimeNowtoolIdnodeIdNested Expression ExamplesTroubleshooting