BotFrame

Logic · Workflow node

For each item

The For each item node as it appears in the workflow editor.

What it does

Run a path once for every item in a collection.

The node uses the collection as it exists when the loop begins. Each pass provides the current Item, Key, and Index; after every entry has run, the Done connection continues the workflow.

Typical use

Run the same steps once for every item in a list.

How to use it

  1. Add it from LogicOpen the node library and choose For each item from Logic.
  2. Connect the workflow pathConnect Flow in, then connect the Each item and Done outcomes to their next steps.
  3. Choose settings and connect valuesSet Collection. Connections can also supply values produced by earlier nodes.

Settings

These are the options shown when you add this node. A connected value can replace a setting when the workflow runs.

SettingStarting valueWhat it controls
CollectionNoneUsed when Collection is not connected from an earlier node.

Value connections

Value connections pass information between nodes without changing the order of the workflow. When an input is not connected, BotFrame uses the value selected in the node or details from the starting Discord event when available.

Inputs

CollectionAny value
Required

Outputs

ItemAny value
Optional
Key or indexAny value
Optional
IndexNumber
Optional

What happens when it runs

The node uses the collection as it exists when the loop begins. Each pass provides the current Item, Key, and Index; after every entry has run, the Done connection continues the workflow.

You can use this item in a published BotFrame workflow. You can also test it in the simulator.

These details match the node currently available in the BotFrame workflow editor.