Howwise RSS
AI & Automation9 min read

Make Iterator: Process Each Item in an Array Step by Step

Short answer

To make an iterator array process each item in Make, add Flow Control > Iterator after the module that returns the array, put the array in its Array field, and map the iterator's item fields into later modules. Each element then runs as its own bundle.

Key takeaways
  • Make runs every downstream module once per bundle, and an array inside one bundle is only a field, so modules run once.
  • An Iterator turns 1 bundle holding N items into N bundles, and you must map the Iterator's fields, not the original array.
  • An aggregator with Source module set to the Iterator turns N bundles back into 1, for example one email or one bulk API call.
  • An Iterator on an empty array emits no bundles, so everything after it silently stops unless you add a router fallback route.
  • Cost is roughly 1 trigger + 1 Iterator + (N x modules in the loop), so aggregating, bulk endpoints and inline functions like map() and join() cut usage sharply.

Why does my Make scenario only process the first item of an array?

Make executes each module once per bundle. A bundle is one unit of data moving through the scenario. An array such as line items, rows or attachments is just a field inside that single bundle, so the next module runs once.

When you map something like Items[1].name, you pick element 1 of the array. That is why only the first item ever appears. Nothing is looping, so there is nothing to repeat.

The fix is to change the number of bundles, not the mapping. An Iterator does exactly that.

StageBundlesWhat you see in the bubble above the module
HTTP / app module returns an order11 bundle containing Items (array of 3)
Iterator33 bundles, each containing one item
Per-item module (e.g. Create row)3Runs 3 times, once per item
Array aggregator (Source = Iterator)11 bundle containing an array of results

How do I make an iterator array process each item in Make?

The Iterator lives under Flow Control. Place it directly after the module that outputs the array. In its Array field, map the array itself, not an item of it.

The Iterator outputs one bundle per element. Besides the item's own fields, it exposes Bundle order position (1, 2, 3 ...) and Total number of bundles, which are useful for labels like 'item 2 of 3' or for detecting the last item.

  1. Add Flow Control > Iterator after the module that returns the array.
  2. In the Array field, click the array pill (for example Items) from the previous module.
  3. Run the module once so Make learns the item structure.
  4. Add your next module and map fields from the Iterator section of the mapping panel (for example Iterator > name, Iterator > price).
  5. Run the scenario and check that the bubble above the per-item module shows the item count, not 1.
Warning: The classic mistake is keeping the original mapping, such as HTTP > Items[1] > name, after adding the Iterator. The module then runs N times but writes the first item every time. Remap every field to the Iterator's pills.

Is my data really an array? Checking JSON strings, collections and arrays

If the Iterator's Array field will not accept your data, or it iterates one giant text, the source is probably a JSON string rather than a real array. An array pill shows a list icon or an index like [1] in the mapping panel. A string shows as plain text.

For the HTTP module, enable Parse response so the JSON becomes mappable fields. If the JSON arrives inside a text field (common with webhooks or databases), use JSON > Parse JSON with a data structure, then iterate the parsed array.

A collection is a set of named keys (an object), such as Customer > name. An array is an ordered list. An array of collections is the usual shape: each element is a collection of fields. You iterate the array, then read the collection's keys.

To pick one value without looping, use get(), for example get(1.items; 1) or the dotted path 1.items[].name with map(). Use map(1.items; name) to return every name as an array, and first() or last() for the ends.

{
  "order_id": 8841,
  "items": [
    {"name": "Pen",   "price": 2.5, "qty": 4},
    {"name": "Book",  "price": 12,  "qty": 1},
    {"name": "Stamp", "price": 0.9, "qty": 10}
  ]
}
// 1 bundle in. Iterator on items => 3 bundles out.
// Each bundle: name, price, qty, plus Bundle order position and Total number of bundles.

How do I recombine items? Iterator vs array aggregator

An Iterator splits, and an aggregator merges. Use an aggregator when you need one email, one document or one API call containing all items. Set Source module to the Iterator so Make knows where the loop started. If you pick the wrong source, you get the wrong grouping or a single item.

The aggregators differ by output type:

AggregatorOutputTypical use
Array aggregatorOne array of collections you chooseBuild the items array for a bulk API body
Text aggregatorOne string with a row separatorHTML list or plain-text body of one email
Numeric aggregatorOne number (sum, average, count, min, max)Order total, item count
Table aggregatorCSV-like table textPasting into a doc or file
Aggregate to JSON (JSON app)One JSON stringSending a JSON body to a webhook
  1. Iterator: Array = Items.
  2. Optional per-item modules (lookup, calculation) between the Iterator and the aggregator.
  3. Text aggregator: Source module = Iterator, Text = {{Iterator.name}}: {{Iterator.qty}} x {{Iterator.price}}, Row separator = New row.
  4. Email module after the aggregator: Body = the aggregator's Text output. It runs once.
Tip: Modules placed between the Iterator and the aggregator run per item. Modules after the aggregator run once. Use that position to decide how many operations a step costs.

Can I skip the loop with inline array functions?

Often yes. Make's array functions work inside one mapping field and cost no extra operations, because they run inside the module that uses them.

Use them when you only need a transformed view of the array, not a separate action per element.

GoalFormula in a mapping field
List all names as text{{join(map(1.items; name); ", ")}}
Sum of an array of numbers{{sum(map(1.items; price))}}
First or last element{{first(1.items).name}} or {{last(1.items).name}}
Item count{{length(1.items)}}
Does the array contain a value?{{contains(map(1.items; name); "Pen")}}
Remove duplicates, sort{{sort(distinct(map(1.items; name)); asc)}}
Tip: There is no inline filter function for arrays of collections in every case. To keep only matching items, put a Filter after an Iterator, then aggregate the survivors.

What happens with an empty array, and how do I handle it safely?

An Iterator on an empty array outputs zero bundles. Every module after it simply does not run, and the scenario ends without an error. That is good if nothing should happen, but bad when you expected a message such as 'no items today'.

An aggregator behind an empty Iterator also does not run, so you cannot rely on it to produce an empty result. Instead, branch before iterating.

  1. After the module returning the array, add a Router.
  2. Route 1: filter condition length(Items) greater than 0 (numeric operator). Continue with Iterator, per-item modules and aggregator.
  3. Route 2 (fallback route): leave the filter empty and mark it as Fallback, or use the opposite condition length(Items) equal to 0. Add the 'nothing to process' action, such as a short email or a log row.
  4. Run with a test payload containing an empty array to confirm Route 2 fires.

How many operations does an Iterator cost, and how do I reduce them?

Every module run per bundle counts as one operation, and the trigger counts as one. For 100 items and three per-item modules, expect about 1 (trigger) + 1 (Iterator) + 100 x 3 + 1 (aggregator, if used) = 303 operations. Treat this as an estimate and confirm in the execution history. Nested arrays multiply: 10 orders with 10 lines each, a second Iterator and 2 modules per line gives roughly 10 + 100 x 2 plus overhead.

Reduce usage by aggregating before calling the destination API, using a bulk endpoint, or replacing the loop with inline functions.

Approach (100 items)Modules that runApprox. operations
Iterator + 3 per-item modulestrigger, Iterator, 300 per-item runsabout 302
Iterator + Array aggregator + 1 bulk HTTP calltrigger, Iterator, aggregator, HTTPabout 4
Inline map()/join() into one emailtrigger, emailabout 2
Iterator + Filter + aggregator + bulk call (30 pass)trigger, Iterator, aggregator, HTTPabout 4 to 5
{
  "records": [
    {"sku": "{{Iterator.sku}}", "qty": {{Iterator.qty}}}
  ]
}
// Array aggregator, Source module = Iterator.
// Send its output in one HTTP request body to a bulk-create endpoint.
Warning: Bulk endpoints usually cap records per request, often in the hundreds. Check the destination API's limit and split into chunks, or you will trade high operation counts for failed requests.

Order, limits, errors and debugging inside loops

Make may process bundles in a way that does not guarantee order. Turn on Sequential processing in scenario settings when order matters, for example running balances or numbered rows. It slows throughput but keeps bundles in sequence.

A scenario execution has a time limit of 40 minutes, and each bundle has a maximum data size. A loop over thousands of slow API calls can hit the time limit, so split large arrays across scheduled runs or use bulk calls.

By default, one failing item stops the run, and the remaining items are not processed. Add an error handler on the failing module: Ignore skips that item, Resume substitutes a value, Break stores the bundle as an incomplete execution to retry later (enable 'Allow storing of incomplete executions' in scenario settings), and Rollback reverts the run when the modules support transactions. Commit finalizes it. Choose Break for transient API failures and Ignore only when losing an item is acceptable.

To debug, run the scenario once, then right-click a module and choose Run this module only to retest with stored data. Open the execution history to inspect each bundle's input and output. The numbered bubbles above modules show how many bundles each module processed, which instantly reveals a missing Iterator or a wrong Source module.

Common questions

Do I need an Iterator for every array in Make?

No. If you only need a joined string, a sum or the first element, use map(), join(), sum() or first() in a single mapping field. Use an Iterator only when each element needs its own action or filter.

How do I iterate a nested array?

Iterate the parent array first, then add a second Iterator whose Array field maps the child array from the first Iterator's output. The runs multiply, so 10 parents with 10 children produce 100 child bundles. Set each aggregator's Source module to the matching Iterator.

Why does my aggregator return only one item or the wrong grouping?

The Source module is usually wrong or unset. It must be the Iterator that started the loop you want to close. Also check that nothing between them, such as a Router, split the bundles into different paths.

Does the Iterator itself cost operations?

Yes, plan for it as a module run, then count each following module once per bundle. Router and filters do not add per-item cost beyond the modules they gate. Always compare your estimate with the operation counts in the execution history.

Can I reuse the original data after the aggregator?

Yes. Modules after an aggregator can still map fields from modules before the Iterator, such as the original trigger bundle, because that bundle is the one the loop came from. You cannot map per-item Iterator fields after aggregation, only the aggregated output.

Related topics:makeiteratorarray aggregatorautomationno-code