Selector icon

Selector

Switch between inputs based on a condition

Overview

This node acts as a selector or router that directs input data to one or more outputs based on specified conditions. It supports two main modes:

  • Single Select: Evaluates a condition and passes through the data from either Input 1 or Input 2 depending on whether the condition is met.
  • Multi Select: Uses an index-based condition to select and pass through matching inputs among multiple available inputs.

This node is useful when you want to route data dynamically within a workflow, for example:

  • Sending data down different paths based on content or metadata.
  • Selecting specific inputs to process further based on runtime conditions.
  • Combining or filtering multiple inputs selectively.

Properties

Name Meaning
Mode Determines how inputs are selected:
- Single Select: Passes Input 1 or Input 2 based on a condition.
- Multi Select: Passes matching inputs based on an index number condition.
Conditions (Only in Single Select mode) Defines the condition(s) used to decide which input to pass through. Supports case sensitivity and type validation options.
Convert Types Where Required (looseTypeValidation) If enabled, attempts to cast expression types to match comparison types automatically (e.g., string "false" to boolean false). Available in both modes with slightly different UI placement.
Options Collection of additional settings:
- Ignore Case: Whether to ignore letter case when evaluating conditions.
- Convert Types Where Required: Same as above but shown for older versions.
Wait for All Inputs Whether the node should wait until all inputs have arrived before processing. Applies to both modes.
Condition Index (Only in Multi Select mode) The index number of the input to select and pass through (starting at 0).
Number of Inputs (Only in Multi Select mode) Specifies how many data inputs the node expects (minimum 1, maximum 15).

Output

The node outputs JSON data corresponding to the selected input(s) based on the evaluation of the conditions or index. The structure of the output json field matches the input data passed through.

If multiple inputs are selected (in Multi Select mode), the output will include the combined data from those inputs.

No binary data output is indicated by the source code or properties.

Dependencies

  • No external services or API keys are required.
  • The node relies on internal n8n routing logic imported from bundled dependencies.
  • Configuration options like case sensitivity and type conversion affect how conditions are evaluated but do not require external setup.

Troubleshooting

  • Condition Misconfiguration: Incorrectly defined conditions may cause unexpected routing results. Verify that conditions are correctly set and that case sensitivity and type conversion options align with your data.
  • Input Count Mismatch: In Multi Select mode, ensure the "Number of Inputs" matches the actual connected inputs; otherwise, some inputs might be ignored or cause errors.
  • Waiting for Inputs: If "Wait for All Inputs" is enabled but some inputs never arrive, the node may stall. Disable this option if partial input processing is acceptable.
  • Type Conversion Issues: If loose type validation is disabled, mismatched types in conditions can cause failures or no matches. Enable it if you expect type discrepancies.

Links and References

Discussion