Aggregator doesn't aggregate to one bundle

Hey guys!

I have a problem with my aggregator not outputting one bundle. I’ve looked at over 20 similar topics in this community and most point to making sure I set the source module to my iterator. I have done that, but I’m still getting multiple bundles out of my aggregator.

This is my scenario:


It’s really simple: I get a list of google docs from a folder in my drive. With the iterator I then get the contents of each doc and summarize each with Claude. The aggregator is supposed to put all summaries together in one string. But I’m still getting multiple operations out.


What am I missing?

Literally 30 seconds after posting this, I found my answer. I guess I had to read 21 topics instead of 20 :sweat_smile:

Thanks to: Aggregator not Aggregating

I have to agree with the topic author though - this is not just unintuitive, but according to my use case, most topics point to the wrong solution. I mean… technically, they are probably correct, but there is no way for someone to see this without already knowing the solution itself. Just saying.

I had to choose my first module as the source module for the aggregator. And my problem was this:


Source: Multiple bundles to single bundle


Source: How to aggregate multiple bundles?

etc.

Hope this helps someone else!

3 Likes

Welcome to the Make community!

Setting the Correct Aggregator Source

You need to set the “Source Module” field of the aggregator to where the bundles are coming from. This is usually an Iterator module, but can also be a search/list/repeater module.

For more information, please refer to the Make Academy.

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:

Mapping a Specific Structure Into a Complex Field

The Array Aggregator module is very powerful because it allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

This is done using the “Target structure type” field in an Array Aggregator module.

Here is an example:

As you can see, the “Map” toggle on complex fields are used when you have an array. You can easily build an array variable to map to a future module’s field, by using an Array Aggregator module and select the “Target Structure Type” as the future module’s field you have mapped the array into.

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

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.