Skip to main content

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 transform
  • Expression β€” 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 array
  • Index β€” Position (0-based)

Outputs:

  • Item β€” The value
  • NotFound β€” 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 array
  • Item β€” 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 β€” Source
  • Size β€” 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:

  • Array
  • Start β€” Start index
  • End β€” 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 β€” Source
  • Expression β€” Condition (uses item variable)

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:

  • Array
  • Expression β€” Transformation (uses item variable)

Example:

Array: ["apple", "banana"]
Expression: $uppercase(item)
Output: ["APPLE", "BANANA"]

Sort Array (data.array_sort)​

Sort array ascending or descending.

Inputs:

  • Array
  • Direction β€” "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:

  • Array
  • Separator β€” 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:

  • Object
  • Key β€” Property name

Outputs:

  • Value β€” The property value
  • NotFound β€” 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 object
  • Error β€” 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 serialize
  • Pretty β€” 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 query
  • Query β€” 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:

  • Data
  • Path β€” 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 trigger
  • Value β€” Data to store

Scopes:

  • var.* β€” Persists per user (saved to database)
  • flow.* β€” Lives during current flow only
  • ctx.* β€” 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 exists
  • NotFound β€” Variable doesn't exist
  • Value β€” 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 object
  • Path β€” JSONPath to extract

Example:

Response: {
"status": 200,
"data": {
"weather": {
"temp": 72,
"condition": "Sunny"
}
}
}

Path: "data.weather.temp"
Output: 72

Quick Reference​

CategoryNodes
Stringsstring, template
Transformtransform, as, construct
Arrayscreate, get, length, push, chunk, slice, filter, map, sort, reverse, join, concat
Objectsget, keys, values, merge
JSONparse, stringify
Queriesquery (JMESPath), path_get
Variablesset_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​