This is my current set up.
It’s driving me crazy because all I want to do is to flatten this into
OUTPUT
1
2
3
4
1
2
3
4
1
2
3
4
5
…
35
But I can’t seem to find a way to do this.
flatten keyword doesn’t work because it’s a collection of collections i believe. ChatGPT and the make.com AI is telling me to use iterators, but it just separates out the first one (when I open the output, it only shows me the first one with the 4 subitems). This is driving me insane.
that’s an Array of collections and each collection has a subarray of collections. So yeah flatten wont work here.
Do you want to get to a single array of all the collections? You can use a sequence of iterators followed by an aggregator to restructure the array. Or try with a map() function to get a new array.
Can you get the output bundle from the array aggregator and post it here? This way we can test and see how to get the map() formula to do what you need it to do.
To do this, you can use the built-in function flatten — “Creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.”
{{ flatten (array) }}
e.g.:
{{ flatten(map(2.array; subitems)) }}
(copy-paste the above into the field, or type it exactly as shown)
For more information, the function’s documentation can be found in the Help Centre. You should also complete the tutorials in the Make Academy.
If you need further assistance, please provide the following:
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”.
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.
Here are some ways to provide text content in a way that it won’t be modified by the forum.
Method 1: Type code fence 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 —
Method 3: Upload your file and share the public link —
(this method is only recommended for large files exceeding the forum upload limit)
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.
This will allow others to better assist you. Thanks!
Hope this helps! Let me know if there are any further questions or issues.