Skip to main content

Variables

When you create a workflow and configure nodes and triggers, it automaticaly creates variables. These variables enable you to get and process actual values during the execution of the workflow.


Create a variable#

From the workflow#

Variables are created when you fill the "expected payload" field in the node edition form.
This field expect a JSON format. All the keys of the JSON object will be available as variables in the next nodes.
Only the keys of the first level will be printed but you will be able to use the keys of the nested objects either.

Create Variable Workflow

From the environment#

In the tab "Variables", click on the button "+ NEW VARIABLE".

New Variable Button

Give your new variable a name and value for the differents environments you have.

Create Variable Environment

The variable is now available in all the workspace's workflows.

Use a variable#

Variables are only availables in the parameter section of the node configuration.

Open the variable menu by typing "$".
You can :

  • Find the variable you want to use by typing its name
  • Expand an object with the right arrow of your keyboard ""
  • Reduce an object with the left arrow of your keyboard ""
  • Move between objects / keys with the up and down arrows of your keyboard "", ""

Select the variable you want to use by typing "enter".


Use variables

The value of the variable will be hard replaced during the execution. Be careful if you want to use it in a JSON object, you will have to add "" around the value if you want to use it as a string.
If your variable foo equals bar it will be replaced as bar not "bar".

caution

You can only use variables of previous nodes on the same branch. You will not be able to use result of nodes from a concurrent branch


If you get stuck at a point above, please reach out to support@butternut.tech or via this form.
We're here to support you, and together we can build great things.