Go to Studio

Static Constants

Define named constants (plaintext or encrypted) and expose each one as a separate output port for downstream nodes

What does the Static Constants node do?

The Static Constants node lets you define a list of named constants and expose each one as a separate output port on the node. Unlike Static Text (one fixed string), Static Constants is built for the “small bag of named values” use case — API endpoints, model names, default thresholds, sensitive tokens — all defined in one place and consumed individually downstream.

Each constant is either plaintext (stored as-is) or encrypted (the value is sent to the server, encrypted, and stored as ciphertext — the original plaintext is never persisted). Encrypted constants are perfect for short secrets that need to live with the workflow without leaking in exports.

Common use cases:

  • Pinning configuration: model name, temperature, request size, retry budget
  • Naming an environment / tenant once and referencing it from many nodes
  • Storing short secrets (per-workflow API tokens, webhook URLs) alongside the logic
  • Centralising thresholds reused by several Conditional / Filter List nodes

Quick setup

Add the node to the canvas

Open the Node Library, go to InputsStatic, then drag Static Constants onto your workspace.

Define your constants

Open the node settings, click Add constant, and fill the row:

  • Name — the identifier (letters, digits, underscores; must start with a letter or underscore). This becomes the output port label and the name downstream variables will use.
  • Value — the value the port emits at runtime.
  • Encrypt value — toggle ON for secrets. The value is sent to the server, encrypted with the workflow’s key, and only the ciphertext is persisted. The settings panel shows •••••••• for already-encrypted rows.

Add as many rows as you need. Names must be unique.

Connect the outputs

Each constant becomes its own output port (labelled with its name). Wire each port to the downstream consumer that needs that value.

Configuration parameters

Required fields

Name string required default: Static Constants

Node name — Label shown on the canvas. Rename to reflect the constants’ role (“LLM defaults”, “Webhook tokens”).

Description string required default: Define named constants (plaintext or encrypted) and expose them as separate outputs

Node description — A short note about the constants’ role.

Constants list required

List of constants, each with:

  • name (string) — Identifier matching ^[A-Za-z_][A-Za-z0-9_]*$. Must be unique across the node’s constants.
  • value (string) — The value the port emits. Plaintext rows can be empty (output is ""); encrypted rows must have a non-empty value.
  • encrypted (boolean) — When true, the value is encrypted server-side on save and stored as ciphertext. The settings panel displays •••••••• for persisted ciphertext.
Info

Replacing an encrypted value — A persisted encrypted row can’t be decrypted back to plaintext in the UI (only the runtime resolves the ciphertext). Click Replace on the row to enter a new value; on save it’s re-encrypted and the old ciphertext is overwritten.

Info

Toggling the encrypt flag — Switching ON for a plaintext row keeps the value (it’ll be encrypted on save). Switching OFF for a persisted encrypted row clears the value (we can’t decrypt the ciphertext client-side, so the only safe behaviour is to ask for a fresh plaintext).

What does the node output?

One output port per defined constant — the port label matches the constant’s name. Each port emits a string.

<constant_name> string

The constant’s value. For plaintext constants, the literal value entered in the settings. For encrypted constants, the decrypted value resolved at runtime (the workflow runner decrypts the ciphertext on demand).

Example: if you define three constants model, temperature and api_token, the node exposes three output ports — model, temperature and api_token — that you can connect to different downstream consumers.

Usage examples

Example 1: LLM defaults centralised in one node

Pin model name and temperature once; reuse across several LLM nodes in the workflow.

Constants:

NameValueEncrypted
modelclaude-sonnet-4-6no
temperature0.2no
top_p0.95no

Wire model → LLM node’s “Model” input, temperature → “Temperature”, etc.

Example 2: Per-workflow API token

A workflow that calls an internal microservice. The token is workflow-specific, doesn’t belong in the global integrations, and should never appear in plaintext in the database.

Constants:

NameValueEncrypted
service_base_urlhttps://internal.dng.ai/v2no
service_tokeneyJhbGciOi…yes

Wire both to an HTTP Request node — the runtime decrypts service_token just before sending the request.

Example 3: Thresholds reused by several Conditional nodes

A pipeline that gates several downstream branches on the same min-quality bar.

Constants:

NameValueEncrypted
min_score0.7no
min_word_count300no

Each Conditional node consumes the relevant threshold without re-typing the value (and a change in one place propagates everywhere).

Best practices

Tip

One node per concern. Don’t mix LLM defaults with secrets in the same Static Constants node — separate nodes are easier to scan and to grant fine-grained access to.

Tip

Name constants like environment variablesUPPER_SNAKE_CASE or snake_case, no spaces. The name regex enforces the format and downstream variable bindings stay clean.

Warning

Encryption is workflow-scoped, not user-scoped. Anyone with edit access to the workflow can change an encrypted value (they can’t read it, but they can replace it). Manage workflow ACLs accordingly for secret-bearing nodes.

Warning

Don’t store enterprise secrets here. Use the platform’s first-class integrations (OAuth, vaulted credentials) for production-grade secrets. Static Constants is best for short-lived, workflow-specific tokens.

Common issues

'Constant name is invalid' validation error

Cause: The name doesn’t match ^[A-Za-z_][A-Za-z0-9_]*$ — typically because it starts with a digit, contains a space, dash or other punctuation.

Solution: Rename to a valid identifier (api_token, MODEL_NAME, _internal). Spaces and hyphens are not allowed.

'Duplicate constant name'

Cause: Two rows share the same name (case-insensitive). Output ports must be unique.

Solution: Rename one of the duplicates. The validator highlights the duplicate row in red.

'Encrypted value is required'

Cause: A row was toggled to encrypted but the value field is empty. Encrypted rows can’t be empty (encrypting an empty string offers no value and pollutes storage).

Solution: Fill the value, or toggle encryption OFF if you really want to emit an empty string.

An encrypted value 'forgot itself' after I toggled encryption OFF

Cause: Toggling encryption OFF on a row whose ciphertext was already persisted clears the displayed value — the platform can’t decrypt the ciphertext to plaintext from the settings panel.

Solution: Re-enter the plaintext value. If you didn’t actually want to change the ciphertext, toggle encryption back ON and use Replace to keep the row in encrypted mode.

Output ports don't appear / don't update after editing

Cause: Output ports are derived from saved constants. If you edited but didn’t save, the canvas still shows the previous port set.

Solution: Click Update in the settings panel — output ports refresh from the saved constants list.