Put all the collection from an array as INPUT - not just the first collection of text

I’m working with an automation scenario in Make where I need to pass text data from an array of collections as input to an OpenAI module. Each collection in the array contains a text field, and my goal is to send all these text fields as a combined input.

However, when I try mapping the array of collections directly into the OpenAI module, it only includes the first collection’s text, leaving out the rest. I’m looking for a solution that allows me to pass all the text fields from each collection in the array as a single, unified input to the OpenAI module.

What I’ve Tried:

Using the Join() function to concatenate all text elements from the array, but I’m having issues with getting the correct syntax or structure for it to work as expected.

Attempting various mapping methods, but they either only take the first text field or don’t map correctly to the input.

How can I make sure that all the text fields from the array are combined and passed as one single input to the OpenAI module? What is the correct way to use Join() or another function to achieve this?

Any guidance or solutions would be greatly appreciated. Thanks for your help!!

Images of the scenario and how I have mapped:
image|601x500

Welcome to the Make community!

You can use the built-in functions map and join

e.g.:

{{ join(map(55.array; text); " ") }}

For more information, see the function documentation in the Help Center, and do the Make Academy.

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Thank you Sam, it worked!

1 Like

No problem, glad I could help!

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.