Global Variables
A global variable is a named, reusable value stored in one place that any job in Qinfinite can reference. Instead of typing the same email address, URL, or token into dozens of workflows, you save it once as a global variable and reference it by name. When the value needs to change, you update it in one place and every job that uses it automatically picks up the new value.
Global variables also support encryption for sensitive values, expiry reminders for time-limited credentials, and typed inputs so the platform knows whether you're storing a number, a date, a list, or plain text.
How It Works
When to Use Global Variables
| Situation | How a global variable helps |
|---|---|
| The same value appears in many workflows | Change it once and all jobs pick up the new value |
| A sensitive value like a token or password | Encrypt it — jobs can use it without the value ever being visible in plain text |
| A value with a renewal date | Set an expiry date and get email alerts before it becomes stale |
| A business rule that should stay consistent | Store thresholds, limits, or owner names centrally so they never drift |
| Environment-specific settings | Use a naming convention like Prod_API_URL and QA_API_URL to keep environments separate |
Global variables are shared across all jobs. Editing or deleting a variable affects every job that references it. Double-check what's using a variable before making changes.
Variable Types
When you create a global variable you choose a type. The type determines what the value input looks like in the form and how the platform stores and validates the value.
| Type | What it stores | Input format |
|---|---|---|
| String | Any text — a URL, an email address, a name | Free-text input field |
| Number | A numeric value — a limit, a count, a threshold | Numeric input field |
| Boolean | A true/false flag | Dropdown: True or False |
| Date | A calendar date | Date picker (yyyy-MM-dd) |
| DateTime | A date combined with a specific time | Date-and-time picker |
| Time | A time of day without a date | Time picker |
| List | An ordered collection of values (all the same type) | Repeatable rows — add one item per row |
| Map | A set of key-value pairs (all values the same type) | Key-value pair rows — each key must be unique |
List and Map Types
List and Map require you to choose a sub-type first — the type of the individual items inside the collection. Sub-type options are String, Number, and Boolean.
- List example: A list of notification email addresses (sub-type: String). You add one email per row and can add or remove rows freely.
- Map example: A map of department names to budget limits (sub-type: Number). Each row has a key (department name) and a value (the budget). Duplicate keys are flagged immediately.
Creating a Global Variable
- Open Global Configurator and go to the Global Variables tab.
- Click Add Variable.
- Fill in the form:
| Field | Rules | Notes |
|---|---|---|
| Variable Name | 4–30 characters, letters, numbers, underscore, or hyphen | Must be unique — the form checks for duplicates as you type |
| Description | Optional | Helps teammates understand what the variable is for |
| Tags | Optional, chip-style input | Use tags to filter and search later |
| Variable Type | Required | Determines the value input format |
| Value | Required | Matches the input style for the selected type |
| Encrypted | Checkbox | Tick this to protect a sensitive value before saving |
-
If the value has an expiry date, tick Notify Expiry. Three more fields appear:
- Expiry Date — the date the value becomes invalid (yyyy-MM-dd)
- Days Before Expiry — how many days before the expiry date to send the first alert
- Notification Emails — the email addresses that should receive the alert (chip input, one address per chip)
-
Click Save.
Use a consistent naming pattern such as Prod_Support_Email or QA_API_Base_URL. Underscores and hyphens are both allowed. A clear prefix makes variables much easier to find and avoids accidental edits to the wrong environment's values.
Referencing a Variable in a Workflow
Once saved, a global variable can be referenced inside any job step that accepts dynamic expressions. The reference syntax is:
{{gv.variableName}}
For example, if your variable is named Support_Email, use:
{{gv.Support_Email}}
The platform resolves the reference at runtime and substitutes the stored value. If the variable is encrypted, it is decrypted automatically — the decrypted value is used for the job without ever being written to a log.
To copy the reference format, click the copy icon next to the variable name in the table. The copied text uses the format #[gv.variableName].
Encryption
Tick the Encrypted checkbox before saving to protect a sensitive value.
How it works behind the scenes:
- When you save, the value is serialized and encrypted using HashiCorp Vault Transit encryption.
- The encrypted bytes are stored — the original plain-text value is not retained in the database.
- Jobs that reference the variable receive the decrypted value at runtime, directly in memory.
- The variable row in the table shows a lock icon to indicate the value is encrypted, and the displayed value is truncated and masked.
To view the decrypted value manually:
Click the Decrypt action in the row's action menu. A dialog will prompt you for a decryption key (between 2 and 100 characters). Enter the key and confirm. The platform calls the decrypt API and reveals the value in the dialog only — it is not stored anywhere in plain text.
Decryption requires the correct key. If you do not have the key, the value cannot be retrieved from the UI. Keep your decryption keys safe.
Expiry Notifications
If a variable holds a value that will eventually become invalid — such as an API token, a certificate, or a contract date — you can configure an expiry reminder.
How notifications work:
- The platform runs a scheduled check every day at 10:00 AM.
- If a variable's expiry date is within the configured notification window (for example, 30 days out), an HTML email is sent to every address in the notification list.
- The email is rendered from a template and clearly identifies the variable name, its expiry date, and how many days remain.
- Notifications continue to fire each day until the expiry date passes or the variable is updated.
| Field | What to enter |
|---|---|
| Expiry Date | The date the value becomes invalid, in yyyy-MM-dd format |
| Days Before Expiry | The number of days before that date to start sending alerts |
| Notification Emails | The people who should receive the alert — add one address per chip |
The Variable Table
The main table shows all global variables with these columns:
| Column | Notes |
|---|---|
| Name | Shown with a globe icon. Copy icon copies the reference format. |
| Type | Shown with a type icon |
| Value | Truncated for long values. Copy icon available. Lock icon shown if encrypted. |
| Tags | All tags for the variable |
| Created | Date the variable was created |
| Last Modified | Date of the most recent change |
| Actions | Decrypt (encrypted variables only), Edit, Delete |
Global variables are hard-deleted — there is no recycle bin or undo. If a job still references the variable after deletion, that job will fail at runtime. Make sure no active jobs depend on a variable before you delete it.
Related Pages
- Datasets — for structured data blocks like JSON, CSV, or lookup tables
- Import and Export — move global variables between environments