Skip to main content

For Each

Runs on: Shared — pure logic, runs on the Streamerly backend or inside a chatbox overlay.

The For Each node takes a list as input and executes the rest of the flow once for each item in that list. On every iteration it emits the current item through the Item output and the zero-based position through the Index output. Iterations run sequentially — each one completes before the next begins. The node will process up to 1000 items; any additional items beyond that limit are silently skipped.

Use For Each when you have a collection of values — such as a list of active raffle entries or a set of chat usernames — and you want to process each one individually, for example to send a personalized message, update a per-user variable, or filter out invalid entries one by one.

Inputs

NameTypeDescription
listanyAn array of values to iterate over. The item type determines the type emitted on the Item output.

Outputs

NameTypeDescription
ItemanyThe current element of the list on this iteration.
IndexnumberThe zero-based position of the current item in the list (0 for the first item, 1 for the second, and so on).

Example

A flow variable holds a list of usernames who entered a giveaway. Connect that variable to a For Each node. On each iteration, connect the Item output (a username string) to a chat message effect that says "Congratulations, [username], you've been selected!" Run the flow once to thank every winner without manually wiring up separate branches for each name.