Image Mapping

What are you trying to achieve?

“image_url_map”: {
“image1.png”: “https://static.wixstatic.com/media/488d88_eeb1583c042d4a35aa2223525d2bf707~mv2.png”,
“image2.jpg”: “https://static.wixstatic.com/media/488d88_d5a22c9d4a5f41ee9ed7afb3ef2c34b0~mv2.jpg”,
“image3.jpg”: “https://static.wixstatic.com/media/488d88_660ca567d98942aea307f67cf3c17056~mv2.jpg”,
“image4.png”: “https://static.wixstatic.com/media/488d88_434f5104ef694fd8aec5e0998f79399c~mv2.png”,
“image5.png”: “https://static.wixstatic.com/media/488d88_356cf9b43faa411a85179341e0eadc8b~mv2.png”,
“image6.jpg”: “https://static.wixstatic.com/media/488d88_d96d26d25101438089ad1ac982eada21~mv2.jpg”,
“image7.jpg”: “https://static.wixstatic.com/media/488d88_4f3ed402f87f464c9ad5155e545c31fa~mv2.jpg
}
}

HTTP make a request - Request content

{
{{102.json2}},
“image_url_map”: {
“{{88.array[1].name}}”: “{{88.array[1].data}}”,
“{{88.array[2].name}}”: “{{88.array[2].data}}”,
“{{88.array[3].name}}”: “{{88.array[3].data}}”,
“{{88.array[4].name}}”: “{{88.array[4].data}}”,
“{{88.array[5].name}}”: “{{88.array[5].data}}”,
“{{88.array[6].name}}”: “{{88.array[6].data}}”,
“{{88.array[7].name}}”: “{{88.array[7].data}}”
}
}
im mapping images like this on Make.com and if there are more than 7 images, it fails. can someone tell me how to map them so it works with any number of images?

1 Like

Hi @gigi_giunashvili Welcome to the community!

You can use slice function to get range of array up to desired items needed and accepted by action or API. Further if this doesn’t help it will be great if you can share more screenshot and explain what are you trying to achieve with scenario modules explained.

Best,
@Prem_Patel

Hey Gigi,

you need to dynamically build the call.

At the moment you are hardcoding the array mapping and it will fail with any other number of images besides 7. Use an iterator module followed by a text aggregator and have the body of the request be made dynamically regardless of the number of items in the array.