Overview
Every node in the Workflow Builder accepts inputs, and those inputs can come from several different sources — live workflow state, static values, stored secrets, reusable variables, or custom TypeScript logic. Each source is called an input type, and choosing the right one determines how flexible, secure, and maintainable your workflow is.
In this article, we'll be covering what each input type is, when to use it, and how they work together.
Understanding where input types appear
Every action node has an Inputs tab in its configuration panel. Each input field in that tab has a type selector — a small control on the right side of the field that lets you choose how that field's value is provided. The available types are the same across all node types.
The type selector icon changes depending on which input type is active.
Choosing from the five input types
| Input type | What it provides | Evaluated at |
|---|---|---|
| State | A direct reference to a value in the workflow state object — trigger data or a previous node's output | Runtime |
| Literal | A static value typed directly into the field | Workflow creation |
| Secret | A secure reference to a sensitive value stored in Workflow Settings | Runtime |
| Variable | A reference to a reusable configuration value stored in Workflow Settings | Runtime |
| Typescript | A TypeScript function that runs at execution time with full access to state, secrets, variables, and utils | Runtime |
Referencing workflow state directly
The State input type lets you reference any value that already exists in the workflow state object — the trigger payload, the output of a previous node, or any field nested within either. References use dot notation.
Use State when the value you need was produced earlier in the same workflow run and you want to pass it forward as-is, without transformation.
State references are the primary way data flows between nodes. If you find yourself retyping the same value in multiple nodes, that value should be referenced from state instead.
Entering a static value with Literal
The Literal input type accepts a plain value typed directly into the field — a string, number, boolean, or JSON object. The value is fixed when the workflow is created and does not change between executions.
Use Literal for values that are genuinely constant: a fixed status string, a hardcoded flag, a known numeric threshold.
Avoid using Literal for values that might change over time — such as base URLs, environment identifiers, or template IDs. Store those in Variables so they can be updated without editing workflow logic.
Referencing sensitive values with Secrets
The Secret input type references a named secret stored in Workflow Settings. Secrets are encrypted at rest and are never exposed in workflow definitions, execution logs, or the builder UI.
Use Secrets for any value that must stay confidential: API keys, authentication tokens, passwords, and other credentials.
The secret is resolved at runtime by name. Rotating the secret value in Workflow Settings takes effect immediately across all workflows that reference it — no workflow edits required.
Secrets and Variables use the same search-based selector UI, but are stored and handled differently. If a value is sensitive, always use Secret — not Variable or Literal.
Reference reusable configuration with Variables
The Variable input type references a named variable stored in Workflow Settings. Variables hold non-sensitive configuration values that multiple workflows may share — base URLs, template IDs, environment identifiers, default timeout values.
Like Secrets, Variables are resolved at runtime by name and can be updated in Workflow Settings without modifying workflow logic. Unlike Secrets, Variable values are visible in the builder and execution logs.
Computing values dynamically with Typescript functions
The Typescript input type opens a TypeScript editor where you write a function that runs at execution time. Functions receive state, variables, secrets, and utils as arguments, and must return the value the input field expects.
Use Typescript when the value you need can't be expressed as a static literal or a direct state reference — when you need to transform data, combine values from multiple state paths, apply conditional logic, or call a utility helper.
Functions have access to utils, which provides
helpers for structured error handling, ID conversion, and date math. See
Using utils in
Workflow Functions
for the full reference.
Choosing the right input type
When configuring an input field, use this as a guide:
- The value comes from earlier in this workflow run — use State
- The value is fixed and will never change — use Literal
- The value is sensitive (an API key, a password) — use Secret
- The value is shared across workflows and may change — use Variable
- The value needs to be computed, transformed, or combined — use Function
In practice, some nodes use a mix. A gaiia GraphQL node might take its variables input from a Function, its authentication from a Secret, and a static flag from a Literal — all on the same node.
Related to