Data Nodes
Data nodes transform, manipulate, and process information. They're "Pure" nodes β they execute automatically when their output is needed, no FLOW connection required!
π― Understanding Pure Nodesβ
Data nodes are Pure (no side effects):
- β Auto-execute when output is requested
- β No FLOW input needed
- β Results are cached automatically
- β Safe to connect directly to inputs
[Screenshot: Data node (no FLOW input) connected directly to action node's text input]
String Manipulationβ
Create String (data.string)β
Creates a text value with template support.
Configuration:
- Value: Text content (supports
{{variables}})
Example:
Value: "Hello {{user.first_name}}, you have {{var.points}} points!"
Output: "Hello John, you have 150 points!"
Use Cases:
- Format messages
- Build dynamic URLs
- Create JSON payloads
Format Template (data.template)β
Advanced template rendering with expressions.
Example:
Template: "Total: ${{price * quantity}}"
Inputs: price=10, quantity=3
Output: "Total: $30"
Data Transformationβ
Transform Data (data.transform)β
The Swiss Army knife for data manipulation using JSONata expressions.
Modes:
- Identity: Pass through unchanged
- Expression: Transform with JSONata
- Template: String template
Inputs:
Inputβ Data to transformExpressionβ JSONata transformation
Outputs:
Outputβ Transformed result
JSONata Examples:
Extract field:
Input: { "user": { "name": "John", "age": 30 } }
Expression: user.name
Output: "John"
Calculate:
Input: { "price": 100, "tax": 0.10 }
Expression: price * (1 + tax)
Output: 110
Transform array:
Input: [1, 2, 3, 4, 5]
Expression: $map($, function($v) { $v * 2 })
Output: [2, 4, 6, 8, 10]
[Screenshot: data.transform node with JSONata expression editor]
Use Cases:
- Extract API response data
- Calculate totals/averages
- Reshape JSON structures
- Format complex data
Type Cast (data.as)β
Convert between data types (string β number β boolean).
Modes:
- String β Number
- Number β String
- Any β Boolean
- String β JSON Object
Example:
Input: "42" (string)
Mode: toNumber
Output: 42 (number)
Why It Matters:
β "18" >= 18 // false (string vs number)
β
toNumber("18") >= 18 // true
Construct Object (data.construct)β
Build a JSON object from individual inputs.
Configuration:
- Define field names
- Connect data to each field
Example:
Inputs:
.name β "John Doe"
.email β "john@example.com"
.age β 30
Output: {
"name": "John Doe",
"email": "john@example.com",
"age": 30
}
[Screenshot: data.construct node with 3 input sockets defined]
Use Cases:
- Build API request bodies
- Create database records
- Structure form data
Arraysβ
Create Array (data.array_create)β
Creates an array from multiple values.
Inputs:
Item1,Item2, ...ItemN
Output:
Arrayβ[Item1, Item2, ...]
Get Array Item (data.array_get)β
Extract item at index from array.
Inputs:
Arrayβ Source arrayIndexβ Position (0-based)
Outputs:
Itemβ The valueNotFoundβ Index out of bounds
Example:
Array: ["apple", "banana", "orange"]
Index: 1
Output: "banana"
Array Length (data.array_length)β
Returns number of items in array.
Output:
Input: [1, 2, 3, 4, 5]
Output: 5
Push to Array (data.array_push)β
Add item to end of array.
Inputs:
Arrayβ Original arrayItemβ Value to add
Output:
Arrayβ New array with item added
Example:
Array: [1, 2, 3]
Item: 4
Output: [1, 2, 3, 4]
Chunk Array (data.array_chunk)β
Split array into smaller arrays of specific size.
Inputs:
Arrayβ SourceSizeβ Chunk size
Example:
Array: [1, 2, 3, 4, 5, 6, 7]
Size: 3
Output: [[1,2,3], [4,5,6], [7]]
Use Cases:
- Pagination
- Batch processing
- Grid layouts
Slice Array (data.array_slice)β
Extract portion of array.
Inputs:
ArrayStartβ Start indexEndβ End index (exclusive)
Example:
Array: [0, 1, 2, 3, 4, 5]
Start: 2
End: 5
Output: [2, 3, 4]
Filter Array (data.filter)β
Keep only items matching condition.
Inputs:
Arrayβ SourceExpressionβ Condition (usesitemvariable)
Example:
Array: [5, 12, 8, 130, 44]
Expression: item > 10
Output: [12, 130, 44]
Use Cases:
- Filter search results
- Remove invalid items
- Find matching users
Map Array (data.map)β
Transform each item in array.
Inputs:
ArrayExpressionβ Transformation (usesitemvariable)
Example:
Array: ["apple", "banana"]
Expression: $uppercase(item)
Output: ["APPLE", "BANANA"]
Sort Array (data.array_sort)β
Sort array ascending or descending.
Inputs:
ArrayDirectionβ "asc" or "desc"Keyβ Field to sort by (for objects)
Example:
Array: [3, 1, 4, 1, 5, 9]
Direction: asc
Output: [1, 1, 3, 4, 5, 9]
Reverse Array (data.array_reverse)β
Flip array order.
Example:
Input: [1, 2, 3]
Output: [3, 2, 1]
Join Array (data.array_join)β
Combine array into string with separator.
Inputs:
ArraySeparatorβ Join character(s)
Example:
Array: ["apple", "banana", "orange"]
Separator: ", "
Output: "apple, banana, orange"
Concat Arrays (data.array_concat)β
Merge multiple arrays into one.
Inputs:
Array1,Array2, ...
Output:
Array1: [1, 2]
Array2: [3, 4]
Output: [1, 2, 3, 4]
Objectsβ
Get Object Property (data.object_get)β
Extract value from object by key.
Inputs:
ObjectKeyβ Property name
Outputs:
Valueβ The property valueNotFoundβ Key doesn't exist
Example:
Object: { "name": "John", "age": 30 }
Key: "name"
Output: "John"
Object Keys (data.object_keys)β
Get array of all keys in object.
Example:
Input: { "a": 1, "b": 2, "c": 3 }
Output: ["a", "b", "c"]
Object Values (data.object_values)β
Get array of all values.
Example:
Input: { "a": 1, "b": 2, "c": 3 }
Output: [1, 2, 3]
Merge Objects (data.object_merge)β
Combine multiple objects into one.
Inputs:
Object1,Object2, ...
Output:
Object1: { "a": 1, "b": 2 }
Object2: { "b": 3, "c": 4 }
Output: { "a": 1, "b": 3, "c": 4 } // Later values override
JSONβ
Parse JSON (data.json_parse)β
Convert JSON string to object.
Inputs:
JSONβ JSON string
Outputs:
Dataβ Parsed objectErrorβ Parse failed
Example:
Input: '{"name":"John","age":30}'
Output: { name: "John", age: 30 }
Stringify JSON (data.json_stringify)β
Convert object to JSON string.
Inputs:
Dataβ Object to serializePrettyβ Format with indentation (boolean)
Output:
Input: { name: "John", age: 30 }
Output: '{"name":"John","age":30}'
Advanced Queriesβ
JMESPath Query (data.query)β
Powerful JSON querying using JMESPath syntax.
Inputs:
Dataβ JSON to queryQueryβ JMESPath expression
Example: Extract Nested Data
Data: {
"users": [
{ "name": "John", "age": 30, "city": "NYC" },
{ "name": "Jane", "age": 25, "city": "LA" }
]
}
Query: users[?age > `26`].name
Output: ["John"]
Example: Transform Structure
Query: users[*].{id: name, location: city}
Output: [
{ "id": "John", "location": "NYC" },
{ "id": "Jane", "location": "LA" }
]
[Screenshot: data.query node with JMESPath query editor]
Use Cases:
- Complex API response filtering
- Data extraction
- Report generation
Learn JMESPath: https://jmespath.org/tutorial.html
Path Get (data.path_get)β
Simple path-based access to nested data.
Inputs:
DataPathβ Dot notation (e.g.,user.address.city)
Example:
Data: {
"user": {
"profile": {
"name": "John"
}
}
}
Path: "user.profile.name"
Output: "John"
Variablesβ
Set Variable (data.set_variable)β
Store a value in variable scope.
β οΈ IMPURE NODE β Must connect FLOW input!
Configuration:
- Scope:
var(persistent),flow(temporary),ctx(node-local) - Key: Variable name
Inputs:
Inβ FLOW triggerValueβ Data to store
Scopes:
var.*β Persists per user (saved to database)flow.*β Lives during current flow onlyctx.*β Local to current node execution
Example:
[data.set_variable]
Scope: var
Key: user_points
Value: 150 (from calculation)
Stored as: var.user_points = 150
Get Variable (data.get_variable)β
Retrieve stored value.
Configuration:
- Scope & Key: Same as set
Outputs:
Foundβ Variable existsNotFoundβ Variable doesn't existValueβ The stored data
Example:
[data.get_variable]
Scope: var
Key: user_points
βFound: value is 150
βNotFound: variable not set yet
Pattern: Handle Missing Variables
[Get Variable]
ββ Found β [Use value]
ββ NotFound β [Set default OR Show "Please register"]
HTTP Response Processingβ
Map HTTP Response (http.map_response)β
Extract data from API responses.
Inputs:
Responseβ HTTP response objectPathβ JSONPath to extract
Example:
Response: {
"status": 200,
"data": {
"weather": {
"temp": 72,
"condition": "Sunny"
}
}
}
Path: "data.weather.temp"
Output: 72
Quick Referenceβ
| Category | Nodes |
|---|---|
| Strings | string, template |
| Transform | transform, as, construct |
| Arrays | create, get, length, push, chunk, slice, filter, map, sort, reverse, join, concat |
| Objects | get, keys, values, merge |
| JSON | parse, stringify |
| Queries | query (JMESPath), path_get |
| Variables | set_variable, get_variable |
Common Patternsβ
Pattern 1: API Response β Displayβ
[HTTP GET /api/weather]
β Response
[data.query]
Query: data.current.temp_f
β
[data.string]
Value: "Temperature: {{value}}Β°F"
β
[Send Message]
Pattern 2: Calculate & Storeβ
[Get var.total_purchases]
β
[data.transform]
Expression: value + 1
β
[Set var.total_purchases]
Pattern 3: Build Dynamic Menuβ
[HTTP GET /api/categories]
β categories array
[data.map]
Expression: { "label": item.name, "data": "cat_" & item.id }
β
[menu.from_data]
Next Stepsβ
- Advanced Topics: Expressions β β Learn JSONata &JMESPath
- HTTP Requests β β Integrate external APIs
- Menu Nodes β β Use transformed data in menus