Set

The Set node transforms and maps input data to custom output.

The Set node transforms and maps input data to custom output. Use it for uppercase, substring, concatenation, random numbers, and any data transformation—not for calling workflows (use Execute for that).

Overview

PropertyValue
Inputs1
Outputs1
Output$nodeLabel.keyName for each mapping key

Parameters

ParameterTypeDescription
labelstringNode identifier (camelCase)
mappingsarrayKey-value pairs. Each: { key, value } where value is an expression

Agent tool usage

When a Set node is connected to an Agent Node as a canvas node tool, each mapping value can be marked as agent-provided with the bot icon. Marked mapping values become tool parameters that the agent fills at runtime. Unmarked mappings stay fixed in the node configuration.

The bot icon appears only when the Set node is connected to an agent's tools handle. A standalone Set node does not show agent-provided controls.

Expression Rules

  • Reference previous nodes: $nodeName.text, $nodeName.body.field
  • Use functions: $randomInt(1, 10), $range(1, 5), $now.format('HH:mm')
  • $range(a,b) b'yi hariç tutar; a > b durumunda hata verir.
  • Only one $ at the start of the expression—never inside parentheses
  • Access output by key: $setNode.randomNumber, $setNode.text

Example

{
  "type": "set",
  "data": {
    "label": "transformData",
    "mappings": [
      { "key": "text", "value": "$userInput.body.text.upper()" },
      { "key": "firstChar", "value": "$userInput.body.text.substring(0, 1)" },
      { "key": "randomNum", "value": "$randomInt(1, 10)" },
      { "key": "rangeArr", "value": "$range(1, 5)" }
    ]
  }
}

Downstream nodes access via $transformData.text, $transformData.firstChar, $transformData.randomNum, $transformData.rangeArr.