Search HoldMyTwist

Make Iterator: process each item in a list

Split a nested list into separate bundles in Make Free, map each item, and check an empty-list case before connecting a real action.

A wooden conveyor separating aqua parcels one at a time into a brass tray

An array is a list of values. Make's Iterator (opens in a new tab) splits it into separate records called bundles, so later modules can process one item at a time.

Before you start

To get started, you need a Make account. You can create a Make Free account (opens in a new tab) or sign in. You can complete this exercise without connecting another app.

This Make Free practice processes a fictional shopping list. It uses built-in modules and sends nothing outside Make. Leave the scenario Inactive.

1. Create a list to practise with

  1. In Scenarios, click Create scenario. Replace the scenario name at the top left with Iterator shopping-list practice.
  2. Add JSON > Parse JSON. Leave Data structure empty and paste the example into JSON string.
  3. Save the module and scenario. Choose Save anyway only if the warning says the output is unused.
  4. Click Run once. For that unused-output warning, choose Run anyway. Inspect the JSON output for an items array.
Text to copy

{"items":[{"name":"Notebook"},{"name":"Pencil"},{"name":"Eraser"}]}

The outer braces hold one object. The list is inside its items field. This differs from a top-level array, which Parse JSON can already output as several bundles (opens in a new tab).

2. Split the items array

  1. Close the result panel. Add Flow Control > Iterator after Parse JSON.
  2. Click Array. Select items[] from JSON 1 - Parse JSON.
  3. Save and run once. Handle the unused-output warning as above.
  4. Open the Iterator's result bubble. Check its Output for three bundles named Notebook, Pencil and Eraser.
Map the whole items[] array, not one name inside it.

Full Make editor mapping JSON items array into the Iterator Array field

Full Make editor mapping JSON items array into the Iterator Array field

Map the whole items[] array, not one name inside it.

Open full-size image

Full Make editor showing Iterator output bundles Notebook Pencil and Eraser

Full Make editor showing Iterator output bundles Notebook Pencil and Eraser
Open full-size image

Watch out

Each item can trigger the modules after the Iterator. This three-item list makes the following Tools module run three times. Check the output count with a small sample before adding a module that sends messages, creates records or uses more credits.

3. Use the current item

  1. Add Tools > Set variable after the Iterator.
  2. Set Variable name to current_item.
  3. In Variable value, select name from Flow Control 2 - Iterator.
  4. Save and click Run once. The Tools result bubble should show three operations. Open each operation to check its output.

Full Make editor showing three Tools operations after the Iterator

Full Make editor showing three Tools operations after the Iterator
Open full-size image

The outputs are Notebook, Pencil and Eraser. Selecting a value from the original array instead would bypass the current item's field.

If nothing runs after the Iterator

Inspect the source array. For {"items":[]}, this practice reaches the Iterator but does not run the following Tools module. Restore the three-item example before continuing.

If name is absent from the mapping panel, run the source and Iterator with the sample again, then reopen Tools. Check that Array contains the mapped array token.

Why does the result show only one operation?

One operation can produce several output bundles. In this separate Parse JSON example, the input is a top-level array of three named items. JSON runs once and outputs Notebook, Pencil and Eraser as three bundles.

One Parse JSON operation outputs three bundles. Count the entries under Output before adding an Iterator.

Make Parse JSON: one operation, three output bundles.

Make Parse JSON: one operation, three output bundles.

One Parse JSON operation outputs three bundles. Count the entries under Output before adding an Iterator.

Open full-size image

The mapping panel shows Notebook as a sample. Select the name field token once in the next Tools > Set variable module. In this practice it runs three times, using each bundle's own name.

Before adding an Iterator, inspect Output in the source result. Use an Iterator when you need to split an array field. Already separate bundles can flow directly into the next module. Follow the two-input Parse JSON comparison for the exact inputs and steps.

Need an account? Start with Make Free (opens in a new tab). Check the Free-plan limits before scheduling a larger list.

Share this guide