How to post several images with the facebook module

Hi guys

how do you manage to integrate several pictures ( from an array - sometimes there are 2, sometimes there are 4 images ) into a facebook post using the module “create a post with photos”.

I can’t manage that. If I use an iterator, the post is created as often as there are pictures.
Is there a workaround? e.g. that you first create the post with the first picture and then add the other pictures to the post via another module (this would then again go via an iterator). But I have not yet found such a module.
Thank you!
Best regards
Bernd

Hey!!

You have to mix an Iterator (to split your array of pictures into Bundles), and immediately after an Aggregator and then the FB Module.

Here is an example


I simulated your input data, and I assumed pictures are binary data (you could use URLs instead)


You iterate your array


It generates bundles

THEN BE CAREFUL!
You must first add the FB module, just after the Iterator, and only then, add the Array Aggregator.
Why? Because the Array Aggregator will detect that the FB module expects an Array of photos

Follow how I did here

So maybe it will be a little different for you. But the goal is to generate bundles from an Array, and then to rebuild a new array in the format expeted by FB.

Please give it a try and let us know the outcome.

Benjamin

3 Likes

perfect - that’s it. thank you very much! you have to come up with it first to set it up like that :grin:

3 Likes

Welcome to the Make community!

Every result (item/record) from a search/match module will output a bundle. To “combine” them into a single structure, 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.

Read this

The Array Aggregator module also allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!

2 Likes