My goal is simply to merge PDF files using Cloud Convert’s ‘Merge Files’ module, but despite days of trying out various related YouTube videos and search this community for workarounds, I am no nearer to understanding what I need to do. Can anyone help? (I know @samliew has shown to be very helpful with CloudConvert).
In the first screenshot the three test files are successfully download in three seperate operations (where the data output is binary code).
My logical brain thinks I just need to use Cloud Convert’s ‘Merge Files’ module next but I know it’s not that simple and I need to use some form of flow modules to make it work. But I’ve tried so many I’m just going round in circles.
What do I need to put between ‘Download a File’ and ‘Merge Files’ to make a breakthrough.
Oh right, you need an ARRAY of files for a field that accepts multiple items.
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:
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.
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.
Example
Here is an example of how your scenario could look:
This is just an example. Your final solution may or may not look like this depending on your requirements and actual input data.
Hope this helps! Let me know if there are any further questions or issues.
I can easily add array or text aggregators (as I have done in other scenarios) and/or iterators as needed but in this case it’s the adding of the Cloud Convert module that stops the scenario collecting the additional data it needs for an array.
First screenshot shows the operations/bundles data successfully flowing through as you acknowledged.
The third screenshot shows that when the CloudConvert module is connected, the scenario won’t collect the two or more bundles (it was collecting without CloudConvert) it needs to see an array.
As you can see, I did try to put in a sleep module to delay the CloudConvert module. But that didn’t change things. How do we ensure the first set of modules are allowed to do their job before CloudConvert module tries to do it’s job.
PS. I threw in the iterator as a test but, with or without the iterator, the same problem exists, CloudConvert does not see two or more bundles.
Your Array Aggregator is aggregating incorrectly. You also do not need another Iterator module.
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!
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 —
Thanks again Sam. I tried to interpret your previous suggestion. Which I think helped with the aggregator but it only produced a new problem inside CloudConvert. I show you exactly what I changed in this short video.
Sorry, I don’t watch videos on this forum due to time constraints. Please post in the Hire a Pro category if you’d like assistance via screen share.
My profile also has a couple of links to resources that may help, or you can search my previous posts on my profile for answers to similar questions like these.