Catalog action Utility

Perform precise mathematical operations (+, -, *, /, %, **) with arbitrary precision. Supports numbers and strings, with configurable rounding (none, floor, ceil, round). No floating-point errors. Ideal for: token calculations, fee computations, threshold checks, percentage calculations.

At a Glance

FieldValue
Action IDmath-operation
CategoryUtility
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagsmath, calculation, arithmetic, blockchain, utility, precision, compute, read

Payload Schema

FieldTypeRequiredDescription
leftstring | numberYesThe left operand (string or number)
operatorstringYesThe mathematical operator to apply
rightstring | numberYesThe right operand (string or number)
roundingstringYesRounding strategy: 'none' (keep decimal), 'floor' (round down), 'ceil' (round up), 'round' (round to nearest)

Result Schema

FieldTypeRequiredDescription
leftstringYesThe left operand value used
operatorstringYesThe operator used
rightstringYesThe right operand value used
resultstringYesThe result as string (float if rounding='none', integer if rounding specified)
roundingstringYesThe rounding strategy used
expressionstringNoString representation of the operation (e.g., '5 / 2 = 2.5 (none)')

Examples

json
{ "type": "math-operation", "payload": { "left": "example-left", "operator": "+", "right": "example-right", "rounding": "none" }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I