How to use the array aggregator for json2video

Hello,

Currently : My google drive module search for a folder → then get a sharelink for the pictures that are inside the folder (in this case 2 pictures, but it may be up to 30) → then use the array aggregator for the web content link → Then make 2 videos with json2video (1 video per picture)

What I want to do : Google drive module search for folder → Get sharelink for multiple pictures that are inside the folder → Array aggregator → Then Json2video make 1 video with the 2 pictures (So if I have 2-3-4-10 pictures, it still make 1 video with the right template).

I tried everything but I don’t understand how I can make 1 video with multiple pictures ? All the pictures haves the same name so it’s not possible to use multiple get a sharelink module because it will always get the sharelink of the same picture…

Can someone help me please ? Thank you

The array aggregator executes all the modules ahead of it for all the entries it iterates over. So if there are 10 pictures, then JSON2Video will execute 10 times, each time for each picture.

The solution here is to create a JSON object using the total output of Array Aggregator as the Input. This aggregator output can be saved in a variable, and then using the router, in the 2nd execution path the saved values can be converted into a JSON object which can be passed on to JSON2Video module.

I hope this helps.

Hi BotGuys,

Thank you for providing the solution! However, I’m having a bit of trouble understanding it, as I have never created a JSON object before.

I’ve attached some pictures of what I did. Does it accurately represent your instructions?

Thanks again for your help!

@Gaamo, Have you tried making first google drive module as array aggregator source module ?

No I haven’t :sweat_smile:
Does it works ? If the array aggregator is the source module I can use the “get a file” for each picture separately ? Even if all the pictures have the same name

@Gaamo, Yeah. Just test it out. If you put source of the Array Aggregator as the first ‘Fichier photos’ Gdrive it’ll accumulate photos. But make sure you’re still getting module 25 photos in the data parameter in Array Aggregator.

Hi @Gaamo ,

So this is how the router needs to be arranged:

The first execution leg needs to fetch the image URL’s and concatenate them in the variable. This variable is then used in the second execution leg, converted into a JSON object and passed on to the JSON2Video.

I have just structured it here and this scenario does not execute as there are no connections available.

Hey @Gaamo

If you can give me developer access, then I can set it up for you. Please PM to let me know.

Thanks.

I texted you, thank you for helping me out :slight_smile:

1 Like