Skip to main content
Variables allow you to create dynamic, reusable workflows by parameterizing values instead of hardcoding them. Use variables to store API keys, target domains, configuration values, and other parameters that change between runs or environments.
Variables in Trickest

Variable Scopes

Trickest supports two variable scopes: Global (Vault-level) Variables
  • Accessible across all workspaces in your organization
  • Managed by Super Admins only
  • Ideal for organization-wide credentials and shared configuration
Workspace Variables
  • Scoped to a specific workspace
  • Managed by Workspace Owners only
  • Perfect for project-specific targets and team credentials
When a variable exists at both levels with the same name, the workspace variable takes precedence.

Creating Variables

Creating Global (Vault) Variables

Global variables are managed at the organization level and available across all workspaces. Only Super Admins can create and manage global variables.
1

Navigate to Global Variables

From the main sidebar, click on Global Variables.
2

Create Variable

Click the Create variable button in the top right corner.
3

Configure Variable

In the create dialog, set:
  • Name: Variable name (e.g., API_KEY, TARGET_DOMAIN)
  • Value: The variable value
Creating a global variable
4

Create Variable

Create the variable. It will be immediately available across all workspaces.
Creating a global variable
Platform-provided variables like VAULT_NAME, USER_ID, and TRICKEST_TOKEN are automatically created and maintained by Trickest.

Creating Workspace Variables

Workspace variables are scoped to a specific workspace. Only Workspace Owners can create and manage workspace variables.
1

Navigate to Workspace Variables

From the workspace sidebar, click on Variables.
Workspace Variables Page
2

Create Variable

Click the Create variable button in the top right corner.
3

Configure Variable

In the create dialog, set:
  • Name: Variable name (e.g., API_ENDPOINT, TARGET_DOMAIN)
  • Value: The value for this workspace
Workspace Variables Page
4

Create Variable

Create the variable. It will be available only within this workspace.
Workspace variables automatically override global variables with the same name in this workspace. Both workspace and global variables are visible in the Variables page.

Using Variables

Reference variables using the ${{vars.VARIABLE_NAME}} syntax.

As String Inputs in Tools

Variables can be used in any tool input that accepts string values. Simply reference the variable name using the ${{vars.VARIABLE_NAME}} syntax, and the platform will automatically substitute the value at runtime.
Using variables in tool inputs
When the workflow runs, ${{vars.GLOBAL_RATE_LIMIT}} will be replaced with the actual value from your variable configuration.

In Python Scripts

Variables can be embedded directly in your Python scripts. The platform substitutes the values before execution, so treat them as string literals in your code.
Using variables in Python scripts
#!/usr/bin/env python3

# Access variables
target = "${{vars.TARGET_DOMAIN}}"
threads = int("${{vars.MAX_THREADS}}")

# Use in your code
print(f"Scanning: {target}")

In Bash Scripts

Similarly, variables work in Bash scripts by referencing them with the same syntax.
Using variables in Bash scripts
# Access variables
TARGET="${{vars.TARGET_DOMAIN}}"

# Use in commands
echo "Scanning target: $TARGET"
curl  "https://api.example.com/scan?domain=$TARGET"

Variable Dropdown in Scripts

When writing scripts in the Trickest editor, you can quickly insert variables using the dropdown menu. Click the variable icon or use the keyboard shortcut to access all available variables (both global and workspace-specific).
Variable dropdown in script editor
Select a variable from the dropdown to automatically copy the ${{vars.VARIABLE_NAME}} syntax to use in your scripts.

Platform-Provided Variables

Trickest automatically provides several dynamic variables: Global Variables (Available everywhere)
VariableDescription
TRICKEST_TOKENYour platform authentication token (secret)
USER_IDYour user ID
USERNAMEYour username
VAULT_IDYour organization/vault ID
VAULT_NAMEYour organization/vault name
Workspace Variables (Workspace-specific)
VariableDescription
SPACE_IDCurrent workspace/space ID
SPACE_NAMECurrent workspace/space name
WORKFLOW_NAMECurrent workflow name
Usage:
token = "${{vars.TRICKEST_TOKEN}}"
workspace = "${{vars.SPACE_NAME}}"
workflow = "${{vars.WORKFLOW_NAME}}"
I