When building your flow, you will sometimes need to use values returned by action nodes. That's where variables come in. There are 2 types of variables you can use :
These variables are auto-generated from action nodes. They can be access using the given action node ID.
Action variables will be prefixed by $action_
followed by the action's unique ID.
Global variables, are, as their name suggests, variables that are global to your flow. These variable can be added via the Add dropdown menu, or by using the shortcut (shift + g).
Global variables can be set to a static value or a flag value. When creating a global variable you will need to select its type.
Global variables will be prefixed by $gb_
followed by their unique ID.
Static values are defined when creating the variable and cannot be changed.
Flag values are defined when executing your flow. If your flow has one or more of these variables, you will need to pass them as flag in the execution command like so :
npx bashn@latest @flow/team --gb_my-variable=my_value
If one or more flag are missing, your flow will not run.
You can easily use your variables in actions settings. Fields that accept variables are marked with a puzzle piece on the right. Simply start typing your desired variable to add it.
You can quickly view all your available varibles using the Variables tab on the right pane. You can manage your global variables here, and copy the ID of all your variables for easily add insert them.
Bashnode - Build code-free custom CLIs