🔁
Loop
base.loopBase SetLogicRepeat after me! Takes a list and runs the connected flow once for each item in it. Great for sending messages to multiple users, processing a list of scores, or doing anything that needs to happen more than once.
When to use this
- →After this piece, {{item}} (or whatever you named it) is a Spark in the Each path
- →Vault lists expose {{item.column}} too — e.g. {{item.coins}} when looping {{result}}
- →Connect the All Done path to run something after the whole loop finishes
On the canvas
This is what Loop looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
🔁Logic
Loop
base.looplistrequired
{{result}}
asrequired
item
each
done
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
list{{result}} | text | yes | The list to loop through 📋 |
asitem | text | yes | Call each item… 🏷️ |
Sparks this piece adds
After this piece runs, these values are available as sparks in every node downstream.
{{item}}stringCurrent item in the loopOutput ports
eachRuns for every item in the list (one at a time)
doneRuns once after every item has been processed
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
for (const item of items) {
// Each iteration — {{item}} or {{item.coins}} per row
await channel.send(`User ${item.user_id}: ${item.coins} coins`);
}More Logic pieces