Actions2
Get Variables
AI-generatedSummary
Retrieve one or more workflow execution-scoped variables by name, optionally including selected input item fields, returning their current values or specified defaults when missing.
Inputs
- Variables to Get (required) — List of variable names to retrieve, each optionally with a default value to use if the variable is not set.
- Include Other Input Fields — Whether to include fields from the original input JSON in the output.
- Input Fields to Include — If including input fields, specify which fields to include: all, selected fields, or all except selected fields.
- Fields to Include — Comma-separated list of input field names to include when 'selected' mode is used.
- Fields to Exclude — Comma-separated list of input field names to exclude when 'allExcept' mode is used.
Output shape
A list of items, each with a JSON object containing the requested variables and optionally selected input fields; binary data is preserved if included.
If a requested variable does not exist and no default value is provided, the node throws an error by default or outputs an error object per item if 'Continue on Fail' is enabled.
Examples
Example 1: Get variable 'user_id' with default
Variables to Get: [{ name: 'user_id', defaultValue: 'guest' }]