Skip to content

Start here

JSONPath and templates

Read record fields and create dynamic values without writing a custom program.

Workflow settings can use JSONPath to select data and templates to build dynamic values. The accepted expression language belongs to the individual field and handler; do not assume every text box evaluates expressions.

Read a field with JSONPath

$.customer.name reads the nested name from a record such as {"customer":{"name":"Ada"}}. $.status reads a top-level status. Use a field suggestion when available, then check it against a real input record.

Missing paths, explicit nulls, arrays, and multiple matches can produce different results. Test the shape your downstream step receives, especially when extracting repeated elements. A path that works on one sample can fail to match another document type.

Build a Map value

Map supports ${…} expressions. An expression that occupies the entire string preserves its JSON type: ${$.amount} can produce a number. Embedding it inside text produces text, such as Invoice ${$.invoice_number}.

Useful Map functions include coalesce, concat, join, length, lower, upper, trim, number, string, and normalize_url. For example, ${coalesce($.email, 'unknown')} provides a fallback. $${ escapes a literal ${.

Map applies select, rename, drop, then set. Expressions in set read the original input record, including fields removed earlier in the transformation. This is useful for constructing a replacement field without retaining the source field.

Keep syntax local to the handler

A model prompt template and a Map expression may use different variable conventions. Read the relevant step reference and use its insertion suggestions rather than transplanting an expression blindly.

Invalid syntax, unknown functions, and incorrect argument counts can fail validation. Values of the wrong type can fail execution even when syntax is valid: converting "n/a" to a number is different from converting "42".

Validate with nulls, absent fields, and repeated values as well as the happy path. See Map fields, Filter, and configuring steps.