Creating Array from Bundles with ID Items: A Guide for Make.com Users

Have you ever found yourself stuck trying to create an array from bundles with ID items in them? It's a common challenge for many Make.com users, especially when dealing with operations like searching for files in a Google Drive folder, downloading files, and uploading them to Wordpress. The goal is to create a post in Wordpress with an Image gallery of the media files, which requires providing a key/value pair for the ACF. However, the tricky part is figuring out how to go from separate operations, each with their own bundle that has a Media ID, to a single array that only contains the values of those IDs.

Step-by-step Solution

The solution to this problem is simpler than you might think. You can use the map function to create the array you need. Here's how:

  1. Use the map function on the Array Aggregator Array with the Media Item ID as the parameter. This will create a primitive array with the Media IDs.
  2. Use the Transform to JSON module to convert the array into the format needed for the ACF field.

Troubleshooting Tips

If you're having trouble figuring out which module to use, the Transform to JSON module is a good choice for this task. It can take some trial and error to get it right, but once you do, it should work smoothly.

Summary

In conclusion, creating an array from bundles with ID items in them can be a challenging task, but with the right tools and a bit of patience, it's definitely achievable. Remember to use the map function to create your array and the Transform to JSON module to format it correctly for the ACF field. Happy coding!

You do have further questions?

Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.