Data & Utility Modules
Data & Utility Modules
Var — Set Variables
Set typed variables available in downstream expressions.
appId: var
{ "appId": "var", "ref": "setValues", "args": { "values": { "count": 0, "isActive": true, "label": "pending", "amount": 1250.50 } }}Output: { "count": 0, "isActive": true, "label": "pending", "amount": 1250.5 }
Template — Text Rendering
Renders a Go template string with data from the execution context.
appId: template
{ "appId": "template", "ref": "buildEmail", "args": { "template": "Dear {{ .customerName }},\n\nYour invoice #{{ .invoiceNumber }} for ${{ .amount }} is ready.\n\nThank you.", "data": { "customerName": "{{ $prev.getCustomer.name }}", "invoiceNumber": "{{ $prev.createInvoice.number }}", "amount": "{{ $prev.createInvoice.total }}" } }}Output: { "result": "Dear John Smith,\n\nYour invoice #INV-001 for $1,250.00 is ready.\n\nThank you." }
Base64 — Encode / Decode
{"appId": "base64-encode", "args": {"input": "{{ $prev.data.raw }}"}}// Output: {"result": "SGVsbG8gV29ybGQ="}
{"appId": "base64-decode", "args": {"input": "SGVsbG8gV29ybGQ="}}// Output: {"result": "Hello World"}URL — Encode / Decode
{"appId": "url-encode", "args": {"input": "hello world & more"}}// Output: {"result": "hello+world+%26+more"}
{"appId": "url-decode", "args": {"input": "hello+world+%26+more"}}// Output: {"result": "hello world & more"}Regex — Pattern Matching
{ "appId": "regex", "ref": "extractEmail", "args": { "input": "{{ $prev.parseText.content }}", "pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}", "operation": "findAll" }}Operations: match (true/false), find (first match), findAll (all matches), replace, split.
Output: { "matches": ["user@example.com", "admin@corp.com"], "found": true }
Array — Manipulation
{"appId": "array-filter", "args": {"items": "{{ $prev.list.data }}", "condition": "{{ gt .amount 100 }}"}}{"appId": "array-map", "args": {"items": "{{ $prev.list.data }}", "field": "email"}}{"appId": "array-sort", "args": {"items": "{{ $prev.list.data }}", "field": "createdAt", "order": "desc"}}{"appId": "array-deduplicate", "args": {"items": "{{ $prev.list.data }}", "field": "id"}}{"appId": "array-slice", "args": {"items": "{{ $prev.list.data }}", "from": 0, "to": 10}}JSON — Parse & Transform
{"appId": "json-parse", "args": {"input": "{{ $prev.api.responseBody }}"}}// Output: {"data": {...parsed object...}}
{"appId": "json-stringify", "args": {"input": "{{ $prev.buildPayload.data }}"}}// Output: {"result": "{\"key\":\"value\"}"}CSV — Parse & Generate
{ "appId": "csv-parse", "ref": "parseCsv", "args": { "input": "{{ $prev.readFile.content }}", "hasHeader": true, "delimiter": "," }}// Output: {"rows": [{...}, {...}], "headers": ["name","amount","date"], "count": 42}
{ "appId": "csv-generate", "args": { "rows": "{{ $prev.queryDb.results }}", "headers": ["name", "amount", "date"], "delimiter": "," }}// Output: {"content": "name,amount,date\nJohn,1000,2024-01-15\n..."}