Request: Enable Calculations Directly in Variable Node

Hello,

I’d like to suggest a feature to streamline workflow design by enabling calculations directly within the variable node. Currently, if we want to set a new value for a variable through a calculation, we’re required to use a separate calculation node and then assign the calculated result to the variable. This adds extra steps and makes workflows longer, which impacts the overall user experience.

Suggested Solutions:

  1. Allow calculations within the variable node itself.
  2. Alternatively, add an option in the calculation node to “set result in variable” to directly assign the output.

This change would make workflows more efficient and improve usability by reducing the need for additional nodes. Thanks for considering this enhancement!

All nodes, including calculation nodes, can be used as variables as long as the format is correct.

Hello,

Thank you for your response! I’d like to clarify my suggestion to improve workflow efficiency.

Currently, when working on complex workflows that involve frequent updates to variable values (like incrementing a score), it can become quite repetitive and time-consuming to use a separate calculation node followed by a variable node to assign the calculated result. This approach leads to redundancy and adds unnecessary complexity.

Current Process Example:

Here’s what we currently need to do:

  1. Set a variable, e.g., score = 0.
  2. Enter a loop.
  3. Apply a condition.
  4. Perform a calculation.
  5. Assign the result of that calculation back into the variable.

In this setup, steps 4 and 5 are redundant. Having to use separate nodes for calculations and variable assignments adds unnecessary steps, which is especially problematic in heavy workflows with multiple variables—it increases the risk of errors and reduces the overall user experience…

Suggested Improvement:

  1. Combine Calculation and Variable Assignment in One Node: Allow a single node to both calculate and assign the result directly to a variable. This would simplify workflows and reduce the need for multiple steps.
    Here’s a visual of the proposed change for clarity:


2. Enable Calculations Within the Variable Node: Allow the variable node itself to accept simple calculations (e.g., incrementing values) without needing a separate calculation node.
Here’s a visual of the proposed change for clarity:

This change would greatly improve the efficiency of workflows, reduce redundancy, and improve UX by allowing users to set and update variable values in a single step.

Thank you for considering this suggestion!

Thank you for your suggestion, we will discuss it.

The recently released JavaScript script node can significantly improve efficiency in many scenarios, allowing for the completion of much logic within a single node.