Repository navigation
Looping
Home › Looping
A loop repeats a Flow for each item in a JSON array or object. Use Advanced Flow and install JSON Handler before starting. The action and trigger share an exact, case-sensitive name.
- Make an Advanced Flow containing This Flowcard started (1 text).
Type or select the loop name
fruit; save and enable the Flow. - Connect its Item as text token to a notification or other action. You can also use Index to distinguish entries.
- In a separate Advanced Flow add Start Flowcard with Loop. Set
Loopnaam to
fruit, leave Tag empty and set Collection to:
["apple", "pear"]- Set optional Text 1 to
shoppingand Wait to Finish to Yes. Run the starting Flow.
The trigger starts once for apple (index 0) and once for pear
(index 1). Text 1 (argument) is shopping on both runs. For an
array, Key is the index as text; for an object, Key is the
property name and Index is -1. The trigger dispatches items in
order; do not assume that delayed downstream actions or external services
complete in the same order without testing your Flow.
For a string item, Item as text contains the string; for a number,
Item as number contains the number; for a boolean, Item as yes/no
contains the value. Objects, arrays and null are JSON-stringified into
Item as text. The other item tokens start as empty text, -1, and
false respectively; a default is not proof of the item's type.
The action waits for the trigger promises when Wait to Finish is not explicitly false. If set to No, it does not wait for the final set of trigger promises, but dispatch still has ordering waits; it is not a guarantee that all downstream delayed work has finished. The action declares no output tokens. Empty arrays/objects start no item Flows; valid JSON scalars also produce no iterations. Invalid JSON fails the action. There is no stop/break card in this app's current inventory.
Use small collections first. Many triggers, slow actions or delays can hit Homey timeouts or Flow execution limits. Split work into batches or use a purpose-built method when needed; retry carefully to avoid duplicate side effects. FTP example · Action reference · Trigger reference.
Support development - If JSON Handler is useful to you, you can support its
continued development through GitHub Sponsors,
Patreon,
PayPal, or
bunq.
Thank you!