Use of array aggregator and cloudconvert to convert image to jpg

:bullseye: What is your goal?

Goal is to create a scenario to post on Instagram and Facebook using images from google drive folder. took all images from folder and post Instagram carousel and Facebook post with images. I used cloudconvert because 1. i need all images to be jpg for instagram requirements + i used temporary URL to post on Instagram(other Instagram requirement).

:thinking: What is the problem?

The problem is, that I added array aggregator to conver all images before go to next module. When I run scenario I have error convert (null): convert: no images defined … error/deprecate.c/ConvertImageCommand/3368., export/url (INPUT_TASK_FAILED): Input task has failed. The problem is with data attribute. I think array aggregator change format of data in array.value and pass wrong to module Cloudconvert.
link to scenario Turn my folder Photos to Facebook and - Make.com Automation Scenario

:camera_with_flash: Screenshots: scenario setup, module configuration, errors

Hello,

Welcome to the community!

  1. You should convert each image one by one- delete the aggregator before Cloud Convert as each downloaded photo should be processed.

  2. For the Instagram module, set the mapping like this


    you specified the structure in your Array Aggregator module #46 already properly.

Thank you so much. You helped me to solve my problem. I deleted array aggregator before Cloud Convert. Plus, I change Source for Array Aggregator before Instagram, I selected Search File/Folder module, which allowed to finish all convertion of images before go to Instagram posting. However, mapping Array for Instagram module does not work, it come in error ā€œInvalid URL in paramer ā€˜image_url’.

Does CloudConvert return the correct URL? Take a look at the Array Aggregator output bundle also.

CloudConvert returns link for download (screenshot)

Summary

This text will be hidden

Summary

This text will be hidden

Cloudconvert return link for download the image.

Welcome to the Make community!

Does the Module Require You to Map File Data?

Did you forget to download the file using the file’s link/URL? If it’s not downloaded to the scenario, the next module ā€œConvert a Fileā€ can’t access the file binary data (contents).

To do this, you can use the HTTP ā€œGet a Fileā€ module with the file URL that you need to download. Your file has to be publicly accessible on the internet (doesn’t require authentication).

For more information, see the HTTP page in the Make Help Centre, which covers the following:

  • Overview of the HTTP modules
  • Make a request
  • Make a Basic Auth request
  • Make an API key Auth request
  • Make an OAuth 2.0 request
  • Make a client certificate authentication request
  • Get a file
  • Resolve a target URL
  • Retrieve Headers
  • How to generate JSON Web Tokens (JWT)

More Than One File?

If you have an Array of multiple file URLs, you can use an Iterator module, and map the resulting bundle value/URL to the ā€œGet a fileā€ module.

To download multiple files before proceeding to the next module, you can use an Array Aggregator.

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?

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! If you are still having trouble, please provide more details.

— @samliew

I have changed Intagram module, set mapping with Array from Array Aggregator. Now it is works without error. The final scenario could be seen here Turn my folder Photos to Facebook and - Make.com Automation Scenario