Skip to main content
ExuluVariables provides a single get method that reads a named variable from the IMP variables table. If the variable was stored as encrypted (AES-256 via the platform’s variable editor), get decrypts it transparently using NEXTAUTH_SECRET before returning the plaintext value. Use ExuluVariables inside tools, processors, or any server-side code where you need access to admin-managed secrets (API keys, connection strings, toggle values) without hard-coding them.
get throws when the variable name does not exist in the database. Catch the error in callers that handle optional variables.

API surface

ExuluVariables.get

Looks up the variable by name in the variables table, decrypts it if the encrypted flag is set, and returns the plaintext value as a string.
name
string
required
The variable name as it appears in Administration → Variables.
return
Promise<string>
The plaintext variable value. Throws with Variable <name> not found. when the name does not exist.

Example

Inside a tool’s execute:

Notes

  • Encryption uses CryptoJS.AES with NEXTAUTH_SECRET as the key phrase. Both the platform and get must share the same secret.
  • Unencrypted variables are returned as-is from the database.
  • ExuluVariables is a thin convenience wrapper — you can also query the variables table directly via postgresClient when you need the full row.