Skip to content

UnpackList 1.0.0

Overview

Misc Beginner

Version Source

Description

Takes in a list and sends each item to the corresponding output

Configuration Options

No configuration options available.

Inputs

NameData TypeDescription
listlist[Any]The list to unpack. Each item will be sent to its corresponding output connection based on position in the list.

Outputs

NameData TypeDescription
itemsAnyPositional outputs that receive individual list items. The number of outputs must be configured to match expected list length.

Examples

# Unpack a list of user information
blocks:
  - name: unpack_user_data
    type: UnpackList
    inputs:
      list: ["Alice Johnson", "alice@company.com", "admin", 12345]
    outputs:
      - name: item_0
        connection: name_processor
      - name: item_1
        connection: email_validator
      - name: item_2
        connection: role_checker
      - name: item_3
        connection: id_handler

Error Handling

Index Out of Range

Error Code
IndexError
Common Cause
List has more items than configured output connections, causing extra items to be ignored silently
Solution
Ensure the number of output connections matches or exceeds the expected list length. Extra outputs will simply not receive data if the list is shorter.

Invalid Input Type

Error Code
TypeError
Common Cause
Input is not a list (e.g., string, dictionary, or null value)
Solution
Ensure the input is a valid list/array. Use appropriate parsing blocks if starting with JSON strings or other data formats.

Missing Output Connections

Error Code
ConfigurationError
Common Cause
No output connections configured for the UnpackList block
Solution
Configure at least one output connection for each expected list item position. Define outputs as item_0, item_1, item_2, etc.

FAQ

How do I handle lists of variable length?

Configure more output connections than you expect list items. UnpackList will only send data to outputs where list items exist. Extra outputs will remain unused without causing errors. Use Count block first to determine list length if needed.

What happens if the list is shorter than the number of outputs?

Only the outputs corresponding to actual list positions will receive data. If you have 5 outputs but only 3 list items, outputs item_0, item_1, and item_2 will receive data, while item_3 and item_4 will not be triggered.

Can I unpack nested lists?

UnpackList sends the complete value at each position, including nested lists or objects. If you need to unpack nested structures further, chain additional UnpackList blocks or use Flatten block for nested lists.

How do I process each item in a list without knowing the exact count?

For dynamic list processing, consider using iteration blocks or processing the entire list as a batch instead of unpacking individual items. UnpackList works best when you know the expected list structure.

What's the difference between UnpackList and other list processing blocks?

UnpackList distributes individual list items to separate outputs for parallel processing. Use First block for just the first item, Slice block for ranges, or iteration blocks for applying the same operation to all items.