Array Aggregator behaving like Iterator – only outputs 1 URL instead of array

Hi everyone,

I’m building a scenario where I need to collect multiple TTS audio chunk URLs into a single JSON array, but my Array Aggregator is not aggregating. Instead, it’s acting like an Iterator and only outputs one item at a time.

Scenario flow:

  1. Split the input script into chunks.

  2. Send chunks through an Iterator.

  3. Each chunk is processed by HTTP → TTS.

  4. Save the generated audio files to Google Drive.

  5. Convert the contentLink into a usable URL.

  6. Use Array Aggregator to collect all chunk URLs.

  7. Feed them into a JSON module in this format:
    {
    “files”: [
    https://drive.com/chunk1.mp3”,
    https://drive.com/chunk2.mp3”,
    https://drive.com/chunk3.mp3”
    ],
    “output”: “cloud_concat_test.mp3”
    }
    The issue:

    • The Array Aggregator is processing one by one like the Iterator.

    • My JSON output ends up with only 1 URL instead of the expected array of multiple URLs.

    Here’s a snapshot of my scenario (attached).

Welcome to the Make community!

Aggregating the “Tools” module doesn’t do anything. You should be aggregating the Iterator instead. See below for more information.

Combining Bundles Using Aggregators

Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Question: Which is the best aggregator do you think you’ll need for your use-case?

Mapping a Specific Structure Into a Complex Field

If you have an array of collections, in programming terms, this is called an array of objects, or an array with non-primitive data types (“complex”).

The Array Aggregator module is very powerful because it allows you to build a new complex array of collections that matches a later module’s field to map multiple items (collections) to it. Such fields initially would allow you to manually add items, but you can toggle the “Map” switch to the “on” state and map a whole array into a single field.

This is done by selecting the “Target structure type” in an Array Aggregator module.

As you can see from the above example, the “Map” toggle on complex fields are used when you have an array variable (like from an array aggregator). Other combinations of modules may also allow you to generate an array that matches a future field’s array structure, like “Aggregate to JSON + Parse JSON”, or “Create JSON + Parse JSON”, but this is an advanced topic.

Question: Are you mapping your array into a field that accepts more than one item/collection?

Example

Here is an example of how your scenario could look like:

This is just an example. Your final solution may or may not look like this depending on your requirements and actual data.

For more information, see “Mapping with arrays” in the Help Centre. You should also do the Make Academy, which also covers the use of Iterators & Aggregators.

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

Hi @Azizi_Shuma

You only need to adjust the source of your Array aggregator.

  1. If you only see one value, it usually means the aggregator is pointing at the wrong step in the flow.
  2. Double-check the “Source module” dropdown in the Array aggregator and make sure it’s set to the module that actually generates all the bundles you want to combine.