How do I append bundles from multiple operations into a single output?

I have two API calls that return 10 bundles each. How can I append the results into a single collection of the resulting 20 bundles?

After your module use Array Agregator

Not sure I understand. Since I have two branches, where would I put the Array Aggregator module?

I have tried putting it after the 2nd branch API call and setting the Router as the source and that didn’t work.

Use set and get variable.

After the 2023 use set variable make sure this path is first

After the 2024 use get variable and get the variable you set.

Then after the get use a set variable and use the merge function and merge the two.

I tried that earlier, however I could not find a way to get the entire payload of the output from the API call into the variable. The Set Variable will not let me select the entire array.

Welcome to the Make community!

What you’re asking is commonly known as the “Router Magic Formula”.

For more information, see below

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

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.

1 Like

Thank you for the info. I am familiar with setting and getting variables, however I am still stuck not understanding how to combine the outputs from both API calls in the separate branches.

Each call produces 10 bundles. I need a single output of the combined 20 bundles. I am not understanding how to accomplish that.

Welcome to the Make community!

You can use the built-in function merge to merge multiple arrays into a single array.

e.g.:

merge( array1; array 2; array3; ... )

For more information, see the function documentation in the Help Center.

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.