Skip to main content
Question

Any javascript functionality in WhatsApp automation? How to iterate through dynamic JSON array?

  • August 14, 2024
  • 2 replies
  • 91 views

ymemon125

I am able to retrieve the data from a 3rd party API, the response may have up to 10 images, I have the JSON data in manychat but how can I iterate through it and display images? I don’t see any script option.

2 replies

Gustavo Boregio
Forum|alt.badge.img+6
  • Manychat Community Moderator
  • August 15, 2024

It depends on your setup and what you need to do…

One option is to save all images to different custom fields (image1, image2, etc) and use each separately.

This option usually works if you know there's a maximum number of possibilities (in this case, 10).

Then you create an automation in Manychat to display images based on the number of images you have (if you have 5, you show up to image5, and so on)

Or you can use an external tool like make.com and Manychat's API to send the images.

If you need help working out the details let me know, we can jump on a consulting call. I've done similar solutions before.


ymemon125
  • Author
  • Up-and-Comer
  • August 16, 2024

Hi @Gustavo Boregio ,

Thanks for the reply, I used ManyChat API with a 3rd party automation to achieve the objective later, ManyChat is a great tool but this feature should be natively supported.. also their API rate limit is really less..