Dynamic Options

Basic Nodes dynamic_options Professional

Prompt with options from a variable

Overview

The Dynamic Options node displays a message with choices loaded from a variable at runtime. This allows you to present options from API responses, database queries, or other dynamic sources.

How It Works

  1. Load Options: Retrieves options from the specified variable (supports dot notation like api.products or response.data)
  2. Display Choices: Shows the message and options to the user
  3. Store Selection: Saves the selected option as a variable
  4. Continue: Proceeds to the next connected node

Supported Formats

The options variable can be in any of these formats:
- Array of objects: [{"id": "opt1", "label": "Option 1"}, ...] (recommended)
- Array of primitives: ["Apple", "Banana", "Orange"]
- Object/Hash: {"key1": "Display Text 1", "key2": "Display Text 2"}
- JSON string: Any of the above formats as a JSON string (automatically parsed)

Note: Array index access (e.g., items.0 or items[0]) is not supported.

Output Variable

The selected option is stored as an object containing both the id and label:

You selected: {{nodeId.label}}
Option ID: {{nodeId.id}}

Configuration Fields

Message handlebars Required

The message to display to the user above the options.

Show details

Supports Handlebars syntax:

{{variable_name}}
Options Variable variable Required

The variable containing the options to display.

optionsVariable variable Required

Options Variable

The variable containing the options to display.

Show details

Supports dot notation for nested paths:

variable_name api.body.products results.0.items

Supported formats:

  • Array of objects: [{"id": "1", "label": "Option 1"}, ...]
  • Array of primitives: ["Apple", "Banana", "Orange"]
  • Object/Hash: {"key1": "Value 1", "key2": "Value 2"}

Output Variables

This node stores its output in a variable that can be referenced in subsequent nodes using the {{variable}} syntax.

{{variable}}.id string

Selected option ID

{{variable}}.label string

Selected option label

Connection Points

Input
Accepts incoming connections from other nodes
Output
Connects to the next node in the flow

More in Basic Nodes