Iterator not processing Array from Tools module (in this specific sequence)

What are you trying to achieve?

Hi everyone,

I’m encountering an issue in a Make scenario with the following sequence of modules:

Google Sheets → Google Gemini AI → Tools → Iterator → Google Sheets

The specific problem I’m facing occurs in the connection between the Tools module and the Iterator module.

A variable from the Google Gemini AI module contains multi-line text.
The Tools module (using either the “Set variable” or “Set multiple variables” action) takes this multi-line text variable and uses the split() function to create an Array (list) of strings, where each string is one line from the original text. The variable containing this Array (e.g., myArrayVariable) is created correctly in the Tools module, and its output shows it as an Array with the expected elements.

The Iterator module is connected directly after the Tools module. Its “Array” field is correctly mapped to the myArrayVariable coming from the Tools module (e.g., {{Tools_Module_Number.myArrayVariable}}). The variable selector displays this variable as variableName (as a button), indicating it’s an Array.

The problem is: When the scenario runs, the Iterator module only processes 1 bundle, instead of processing one bundle for each element in the Array it received from the Tools module. Its bubble consistently shows the number “1”.

This prevents the subsequent module (the second Google Sheets module, which is configured to add a row) from executing multiple times to add each line of the original text as a separate row.

I have verified that the split() function works correctly in the Tools module with literal text and that the Tools module’s output does show the variable as an Array. However, the Iterator does not recognize it for iteration in this specific flow.

Has anyone encountered a similar issue where the Iterator does not process an Array variable created and passed from a Tools module (Set variable/Set multiple variables) in a sequence like this? Is there a known configuration or limitation that causes the Iterator to not recognize the Array in this specific scenario handover?

Any suggestions or similar experiences would be greatly appreciated.

Thanks in advance.

Screenshots: scenario setup, module configuration, errors






Welcome to the Make community!

Did you mean to split the text by newline?

If yes, you can use the built-in function split — “Splits a string into an array of strings by separating the string into substrings.”

{{ split(text; separator) }}

e.g.: (paste this into the field)

{{ split(16.listaPalabrasClave; newline) }}

For more information, the function’s documentation can be found in the Help Centre. You should also complete the tutorials in the Make Academy.

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.

Okay, here is the English version of the reply, focusing only on the Tools + Iterator problem:


Reply to @samliew:

Hi @samliew,

Thanks for the welcome and for your suggestion! Yes, I am indeed trying to split the text by newlines to get an array of lines.

I have tried using the split() function in a Tools module (Set variable / Set multiple variables) just as you suggested, mapping its output variable to the Iterator’s “Array” field ({{Module_Number.myArrayVariable}}). My scenario has this sequence of modules: Google Sheets → Google Gemini AI → Tools → Iterator → Google Sheets.

My problem is that even though the Tools module’s output shows that the variable is successfully created as an Array with multiple elements, the Iterator module connected immediately after it only processes 1 bundle. It doesn’t seem to iterate over the elements within the array it receives from the Tools module. This prevents the subsequent modules from processing the data element by element.

So, the main problem I am stuck on is getting the Iterator to correctly process the Array output from the Tools module in my specific scenario sequence.

Given that the Tools module does create the array (according to its output), but the Iterator doesn’t iterate (only processes 1 bundle), do you have any further suggestions to ensure the Iterator properly processes an Array variable created in this manner, since the split() method in Tools seems to create the Array internally but the Iterator doesn’t recognize it for iteration?

Thanks again for your help!

Your screenshots doesn’t show that it’s an Array, but a Long String.

Where are you using the split function? Can you provide a screenshot of it?

Hi @samliew,

Thanks for your follow-up questions!

Yes, the split() function is being used in the Tools module (Set variable / Set multiple variables) in my scenario.

Here is a screenshot showing the configuration of the Tools module, specifically the “Variable value” field where the split() function is located:

Please select the function from the variables panel. If you’ve done it correctly, the function will have a light Gray background.

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

@samliew

Hi @samliew,

Thanks again for the quick response and for pointing out what you saw in the screenshots.

Just to clarify regarding the “Long String” – I was indeed already using the split() function in the Tools module to try and create an array. I’ve also now implemented your suggestion to make sure I select the split() function directly from the variables/functions panel to ensure the correct syntax.

After doing that and running the scenario, the output details of the Tools module confirm that the variable is now correctly identified as an Array containing the split lines (it shows listaPalabrasClaveArray with the list of items below it in the output details). So, the split is happening correctly in the Tools module.

However, the problem with the Iterator module persists. It is connected directly after the Tools module and its “Array” field is mapped to this listaPalabrasClave variable from Tools.

When I check the output details of the Iterator module, it shows that it receives the data as an Array in its input (Array: (Array) under INPUT), but it still only processes 1 bundle. Its output shows Value: (Long String) and Total number of bundles: 1.

This confirms that even though the Tools module successfully creates the Array, the Iterator is not processing it element by element to create multiple bundles. It seems to be receiving the Array data but outputs it as a single item.

Given that the Tools module creates the Array and the Iterator is mapped to it, but the Iterator isn’t iterating, do you have any insights into why the Iterator might behave this way in this specific scenario?

Thanks for any further help you can provide!

noone can help me?
Any help¿

You have not yet provided sufficient information to demonstrate the problem that would allow us to reproduce the scenario and any error(s).

To allow others to assist you with your scenario, please provide the following:

2. Scenario Blueprint

Please export the scenario blueprint. Providing your scenario blueprint file will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return - this would greatly benefit you in implementing our suggestions as you can simply paste module exports back into your scenario editor!

To export your scenario blueprint, click the three dots at the bottom of the editor then choose ‘Export Blueprint’.

You can upload the file here by clicking on this button:

3. Output Bundles of ALL Modules

Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).

Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.

You can upload the file here by clicking on this button:

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved, and help you with mapping the raw property names from collections.

Sharing these details will make it easier for others to assist you.

Hola @samliew
blueprint.json (59.0 KB)
bundle.txt.txt (3.1 KB)

Aquí te traigo lo que me pediste para ver el tema del Iterator.

Te paso el Blueprint del escenario y los archivos con la info de entrada y salida (los bundles), concretamente de los módulos Tools y Iterator. Los adjunto [o los pego aquí abajo].

A ver si echándole un ojo a esto puedes ver por qué el Iterator se porta raro y solo me procesa un paquete, ¡si el array de Tools se ve bien!

Gracias por echarle un vistazo y por tu ayuda.

Wrong:

Screenshot 2025-05-02 222857

Correct:

Screenshot 2025-05-02 223228

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

@samliew

1 Like

@samliew thanks a lot!! it works!!