Dynamic mapping - Video or Image on Instagram Carousel

Hi at requested by @Benjamin_from_Make I am creating a new post that references an existing topic.

The original post is this

Where Benjamin explains how to create an Iterator - Aggregator - Instagram structure to pass the Mime-Type and url as variables from a Json to a mapped array that matches Instagram for Business structure.

While testing that I was able to replicate and the solutions works but only for Carousels of Only Images OR only Videos. (See error where Instagram cant find video_url)

In order to create a mixed Carousel there would have to be values mapped to both image_url and video_url as well as the already dinamic MimeType we already have.

Possible solution that I am Brainstorming
I am thinking of:

  • using a Json structure that has the URL duplicated both as image_url and video_url
  • Map this Json to the Instagram Module using a “Custom” structure

Testing this at the moment, I have not yet matched the right interface that Instagram needs


1 Like

Hello @Ale_Morale!

Thanks for starting a new Topic!! I have to say that you’re taking the good direction, building a Json that will contain an array of collections with the relevant fields!

In a few minutes, I will have a look on my side and I will tell you what I found. If in the meantime you find the relevant JSON format, let me know :blush:

See you very soon!

Benjamin

1 Like

UPDATE:

I got it to work.

The JSON needs to have the media_type, image_url and video_url exactly written like that.

{
“slides”: [
{
“fileName”: “slide1”,
“image_url”: “URL1”,
“media_type”: “IMAGE”,
“video_url”: “URL1”
},
{
“fileName”: “slide2”,
“image_url”: “URL2”,
“media_type”: “VIDEO”,
“video_url”: “URL2”
}
]
}

On the Aggregator part select Target Structure → Custom, mark the parameters and nothing more (There is another variable that is user_tag (array with tags) that can be added to improve this mapping if you need that).

After running it I got an error 2207026 on Instagram Module but it was that I was sending a 9:16 video. The requirement for Carousel videos are 1:91 to 4:5 aspect ratio

Screenshot 2024-06-25 at 15.31.36

I fixed my video and my mixed Images and Video Carousel, from a JSON file is posted :partying_face: :party_blob: :meow_party:

Screenshot 2024-06-25 at 15.51.59

Here is a birds-eye view of the full combination for reference (I am starting and ending in a Google Sheet to mark the post as Posted)

5 Likes

Congratulations!! You rock!

Best regards,

Benjamin

3 Likes