Sign Up

Using Variables as String Inputs

Before we delve into the practical example of using variables within the Trickest editor, let's briefly recap the creation and editing of Global and Space Variables.

Global Variables

Global Variables are accessible throughout all your Trickest workflows. They are ideal for storing data that you use frequently across multiple projects.

Space Variables

Space Variables are specific to the workspace they're created in and are used for project-specific configurations. They can override Global Variables with the same name when used within the space.

Implementing Variables in Workflows as String Inputs

In the Trickest Editor, variables can be used as string inputs, allowing you to customize your workflows dynamically only by changing variable values.

Access the Trickest Workflow Editor: Navigate to the specific workflow where you want to use a variable.

Declaring Variables

You can insert variables into your workflow using the syntax ${{vars.variable_name}} inside of string inputs. For instance, for the variable called foo, which can be either Global or within a specific Space, you can write ${{}}

Variables Referencing

There is no difference in providing Global or Space variables regarding syntax.

Imagine a workflow with a subfinder node that requires a domain to scan.

Firstly, let's create a variable root_domain in our Demo Space.

Root Domain Variable in Space

By inserting a variable like ${{vars.root_domain}} in the domain input field, you instruct Trickest to dynamically replace the placeholder with the variable's value when the workflow runs.

Subfinder with Space Specific Variable

Best Practices

  1. Always ensure the variable names are descriptive enough to be easily identifiable within the workflow.

  2. Remember that Space Variables will override Global Variables of the same name within their scope.

Following these steps and best practices, you can efficiently use variables within your Trickest workflows, making your automation processes robust and smooth.

Next up: Using variables for script code