How to Solve Code Integration Issues

Automation platforms like Make are flexible and powerful, but they have some features that could confuse, especially for people who want to use code modules. A common issue comes up when working with Collections.
A Collection in Make is a special type of data structure. It contains key-value pairs.
Even though this data structure is great for storing and handling data within Make, it doesn’t work well with programming languages like JavaScript or Python. These languages expect data in a simpler and more standardized format, like a plain array or a JSON string.
Here’s the problem: collections often contain complex or nested data. Make’s modules can handle these structures, but code modules struggle. They either expect simpler formats like arrays or objects, or they may not understand references or nested data structures that collections often use. Therefore, if you pass a collection directly to a code module, the code will fail.
For example, if you pass a Fireflies meeting transcript directly to a JavaScript module to reformat it, the code won’t work. This is because the structure isn’t compatible, and the code will fail to interpret it entirely. Instead, Fireflies might output transcripts as an array of collections, and each collection represents a sentence that contains metadata like:
While this data is detailed and useful, it’s not ready for code modules. But don't worry, we've found a workaround to fix this problem.
You need a way to simplify and transform the data to pass it to other modules. In this case, we need a tool in between that can transform these collections into JSON objects or strings. Luckily for us, Make provides some built-in tools to help you do just that. Here are some examples: