docs

Custom Nodes

Custom nodes let you save a Function node as a reusable building block with configurable parameters. Define the code once, set up the parameters, and reuse it across any workflow — adjusting parameter values without touching the code.

Threshold Check
python • 2 params

Threshold Check

Parameters

Configuration

FieldDescription
ParametersUser-defined fields configured when creating the custom node. Each has a name, type (String / Number / Boolean), and default value.
Expression modeClick f(x) on any parameter to switch from a static value to an expression referencing upstream nodes (e.g., {data1.price}).
CodeThe embedded function code (read-only in the properties panel). Expand the Code Preview section to inspect it.

Creating a Custom Node

  1. Build and test a Function node with your code
  2. In the properties panel, click Save as Custom Node
  3. Enter a name (e.g., "Threshold Check")
  4. Add parameters — each with a variable name, type, and default value
  5. Click Save to Library

Your custom node appears in the node picker under My Custom Nodes and in the Library page.


How Parameters Work

Parameters are merged into the inputs object at execution time, alongside data from connected edges. Access them with inputs.get('paramName') in Python or inputs['paramName'] in TypeScript.

Parameter typeBehavior
StringPassed as-is
NumberCoerced from string to number
BooleanCoerced from "true"/"false" to true/false
def main(inputs, workflow_variables=None, global_variables=None):
    # Parameters from the custom node properties panel
    threshold = inputs.get('threshold', 100)
    alert_message = inputs.get('alert_message', 'Price alert')

    # Data from connected edges (under the edge label)
    data = {}
    for key, val in inputs.items():
        if isinstance(val, dict):
            data = val
            break

    price = data.get('price', 0)
    triggered = price > threshold

    return {
        'triggered': triggered,
        'message': f"{alert_message}: price {price} {'above' if triggered else 'below'} {threshold}"
    }

Expression Support

Custom node parameters support both static values and expressions that reference data from connected nodes.

ModeExampleDescription
Hardcoded100Static value, same every run
Expression{data1.price}Resolves to the output of a connected node

Click the f(x) button next to any parameter to toggle between modes.

BTC Price
CoinGecko
Threshold Check
Custom
Alert?
triggered = true

In this example, the Threshold Check node's threshold parameter can use f(x) mode with {price_data.data.prices[0].current} to dynamically compare against the live price.


Managing Custom Nodes

Visit the Library page and click the Custom Nodes tab to see all your custom nodes. Each card shows the node name, language, parameter count, and creation date.

Deleting a Custom Node

When you delete a custom node from the Library:

  • The dialog shows how many workflows currently use it
  • Check "Convert existing instances to function nodes" (on by default) to preserve functionality — each instance becomes a regular Function node with parameters embedded as code defaults
  • Existing workflows with embedded snapshots continue to work regardless

Snapshot Model

Custom nodes use a snapshot model. When you add a custom node to a workflow, the code and parameter definitions are copied into the workflow definition. This means:

  • Workflows are self-contained and portable
  • Sharing or remixing a workflow includes the custom node code
  • Editing a custom node in the Library does not affect existing workflow instances

Output

The custom node's output is defined by what your main function returns — identical to a regular Function node.

PathDescription
{custom.your_key}Any key in the returned object. Replace custom with your edge label.
{custom.nested.field}Nested fields via dot notation.
{custom}The entire return value as a single object.

Next Steps

  • Function Node — The base node type that custom nodes are built from.
  • Conditional Node — Route workflows based on custom node output values.
  • LLM Node — Feed transformed data into AI models for analysis.