Search K
Appearance
Appearance
The Math Operations node performs arithmetic and mathematical operations between two numeric inputs or generates random numbers within a defined range.
No external service or node dependencies are required for this node.
| Operation | Description |
|---|---|
| Add | Adds Value1 and Value2. |
| Subtract | Subtracts Value2 from Value1. |
| Multiply | Multiplies Value1 by Value2. |
| Divide | Divides Value1 by Value2. |
| Modulo | Finds remainder of Value1 divided by Value2. |
| Round | Rounds Value1 based on the provided Precision. |
| Random | Generates a random number between Value1 and Value2. |
| Label | Input Type | Description | Required | Visible When | Default | Example |
|---|---|---|---|---|---|---|
| Value1 | Number | The first number that the math operation uses. | ✅ Yes | Always | Null | 1 |
| Value2 | Number | The second number that the math operation uses. | ✅ Yes | Always | Null | 3 |
| Operation | Picklist | The math operation that will be used. | ✅ Yes | Always | Null | Add |
| Precision | Number | Decimal places to round to. | ⚠️ When Visible | When Operation is Round | Null | 2 |
The result of the math operation can be referenced downstream using {{MathOperations-#.Result}} test.
Add Value1 to Value2
| Field | Value |
|---|---|
| Value1 | 10 |
| Value2 | 3 |
| Operation | Add |
| Output | 13 |
Subtract Value2 from Value1
| Field | Value |
|---|---|
| Value1 | 10 |
| Value2 | 3 |
| Operation | Subtract |
| Output | 7 |
Multiply Value1 by Value2
| Field | Value |
|---|---|
| Value1 | 10 |
| Value2 | 3 |
| Operation | Multiply |
| Output | 30 |
Divide Value1 by Value2
| Field | Value |
|---|---|
| Value1 | 12 |
| Value2 | 3 |
| Operation | Divide |
| Output | 4 |
Get the remainder after diving Value1 by Value2
| Field | Value |
|---|---|
| Value1 | 10 |
| Value2 | 3 |
| Operation | Modulo |
| Output | 1 |
Round Value1 by the Precision provided
| Field | Value |
|---|---|
| Value1 | 10.05203 |
| Value2 | 1 Check Developer Notes |
| Operation | Round |
| Precision | 2 |
| Output | 10.05 |
Genereates a random number between Value1 and Value2
| Field | Value |
|---|---|
| Value1 | 1 |
| Value2 | 10 |
| Operation | Round |
| Output | 5.757634544209118 |
| Error Condition | Description |
|---|---|
| Unsupported operation: | An operation has not been selected in the node properties. |
Failed to get string from object for key propertyname | A node property is missing a value or an incorrect data type has been entered. |
| Value2 cannot be zero. | Value2 must not be 0 when using the divide operation. |
Value1, however a random value has to be entered for Value2 to prevent an error.divide operator, Value2 must not be 0.