How to make a module wait?

Hello everyone!
I am asking your help because I am getting crazy here because I don’t understand how to do something that I believe should be quite easily done.

Basically, what I’m trying to do is this: I have 2 Google sheet files, both of which have one column with different words. The final result I want to get is to have one word on another sheet in one of the 2 files, that then will be sent over to the next module.

What I do now (using a script) is:

  1. I delete all duplicates in one file (the one I need to work on)
  2. I order the words based on a number in another column
  3. I compare if the words in one file appear on the other file and add a note in another column
  4. I create a new sheet with only one word in it (the first word that is not present in the other file which has the highest number)

Here comes the part I don’t understand: make keeps going with the automation as soon as it gets the first data coming from Google sheet, whereas it should wait for all the operations in Google sheet to be performed and ONLY THEN move on with the rest of the automation.

How can I have make wait for Google sheet to finish its thing?
Thanks a lot
Elio

Would be great to see a screenshot but here are some ideas:

  • can you set a filter after that stops the operation when not all are done?
  • I think the google sheet module itself should wait, when its the scenario than you could enable the Sequential processing

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, or even the trigger module!

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!

3 Likes

It wooooooorks!!

Thanks samliew!

I added an array aggregator after the HTTP request and it does what I need it to do!

Thanks! :blush:))))

1 Like