Managing Variables
Learn how to create and use variables in Trickest workflows and nodes
On this page8
Overview
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.
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
- Ideal for workspace-specific targets and team credentials
Platform-Provided Variables
Trickest automatically provides several dynamic variables. These are maintained by the platform and can be referenced the same way as user-defined variables.
Global Variables (Available everywhere)
| Variable | Description | Usage |
|---|---|---|
TRICKEST_TOKEN | Your platform authentication token (secret) | ${{vars.TRICKEST_TOKEN}} |
USER_ID | Your user ID | ${{vars.USER_ID}} |
USERNAME | Your username | ${{vars.USERNAME}} |
VAULT_ID | Your organization/vault ID | ${{vars.VAULT_ID}} |
VAULT_NAME | Your organization/vault name | ${{vars.VAULT_NAME}} |
Workspace Variables (Workspace-specific)
| Variable | Description | Usage |
|---|---|---|
SPACE_ID | Current workspace/space ID | ${{vars.SPACE_ID}} |
SPACE_NAME | Current workspace/space name | ${{vars.SPACE_NAME}} |
WORKFLOW_NAME | Current workflow name | ${{vars.WORKFLOW_NAME}} |
Creating Variables
Create variables from the Variables area in the platform, then reference them in node parameters and scripts.
Create a global or workspace variable
In the global menu, open Variables under Workspace or Platform (Global), depending on the scope you want.
Click New (or Create variable).
Set Scope to Global or Workspace as needed. Enter a Name (for example, TARGET_DOMAIN) and a Value (for example, trickest.com).
Save the variable.
Using Variables
You can reference variables in any node parameter that accepts a value (for example, string inputs, flags, URLs, and tool parameters). The platform substitutes the values before execution, so treat them as string literals in your code.
Use variables in tool/module parameters
In a tool node parameter field, enter the variable expression directly.
Example: set a domain input to a variable instead of a hardcoded value:
domain:${{vars.TARGET_DOMAIN}}
This is the recommended approach for values you expect to reuse or change over time.
Use variables in scripts
Variables can also be used inside script content. In the current editor, scripts do not provide a variable dropdown - type the variable reference directly.
Example (Bash):
# Access variables
TARGET="${{vars.TARGET_DOMAIN}}"
# Use in commands
echo "Scanning target: $TARGET"
curl "https://api.example.com/scan?domain=$TARGET"Example (Python):
#!/usr/bin/env python3
# Access variables
target = "${{vars.TARGET_DOMAIN}}"
threads = int("${{vars.MAX_THREADS}}")
# Use in your code
print(f"Scanning: {target}")