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

**URL:** <https://community.make.com/t/put-all-the-collection-from-an-array-as-input-not-just-the-first-collection-of-text/59435>\
**Category:** Questions\
**Tags:** collections, arrays\
**Created:** [November 1, 2024, 9:54am UTC](https://community.make.com/t/put-all-the-collection-from-an-array-as-input-not-just-the-first-collection-of-text/59435 "2024-11-01T09:54:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boijdingo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@Boijdingo](https://community.make.com/u/Boijdingo)\
**Post date:** [November 1, 2024, 9:54am UTC](https://community.make.com/t/put-all-the-collection-from-an-array-as-input-not-just-the-first-collection-of-text/59435/1 "2024-11-01T09:54:17Z")

</div>

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](https://community.make.com/uploads/short-url/o37eLVmU3yp7tV5P3k1h73FmjWL.jpeg)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/1/416343bacbd9eed2421accc151021c197bf284ce.png)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [November 1, 2024, 11:39am UTC](https://community.make.com/t/put-all-the-collection-from-an-array-as-input-not-just-the-first-collection-of-text/59435/2 "2024-11-01T11:39:54Z")

</div>

Welcome to the Make community!

You can use the built-in functions `map` and `join`

e.g.:

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

```

For more information, see the function documentation in the [Help Center](https://www.make.com/en/help), 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](https://www.make.com/en/help) | [Tutorials](https://www.make.com/en/help/tutorials.html) – Make “Manual”
- [Make Academy](https://academy.make.com) – Basics 101: Learn Make and get certified

### Help Centre Basics

- [Mapping](https://www.make.com/en/help/mapping/mapping) – What is mapping? What can I map?
- [Mapping with arrays](https://www.make.com/en/help/mapping/mapping-arrays) – How to map items in an array
- [Aggregate an array for mapping complex fields](https://www.make.com/en/help/tools/flow-control#customizing-the-output)
- **Date Format** : [tokens for `parseDate`](https://www.make.com/en/help/functions/tokens-for-date-time-parsing) | [tokens for `formatDate`](https://www.make.com/en/help/functions/tokens-for-date-time-formatting)
- [HTTP modules](https://www.make.com/en/help/tools/http) – Make a request, Get (download) a file
- [Webhooks](https://www.make.com/en/help/tools/webhooks) – Error Handling, Responding to webhooks

### Articles & Videos

- [Router Magic Formula](https://www.youtube.com/watch?v=4Q-5BsCtJu4) - YouTube
- [Error Handlers in Make](https://www.youtube.com/playlist?list=PLRE9E-rAD8U10mx2TRs54Nq1XJDdK9Kx4) - YouTube playlist
- [Getting started with OpenAI](https://community.make.com/t/getting-started-with-openai-gpt-3-and-make/7796) - How to setup and use OpenAI (ChatGPT) in Make
- [How to use Regex in Make](https://community.make.com/t/how-to-use-regex-in-make/202) - How to use pattern matching to extract the text you want
- [Webhooks – Make Academy](https://academy.make.com/courses/IntermediateC04) – tutorial on how to use Webhooks

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

— @samliew

P.S.: Investing some effort into the [Make Academy](https://academy.make.com) will save you lots of time and frustration using Make.

---

<div class="post-metadata">

**Author:** ![Boijdingo](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@Boijdingo](https://community.make.com/u/Boijdingo)\
**Post date:** [November 3, 2024, 8:05am UTC](https://community.make.com/t/put-all-the-collection-from-an-array-as-input-not-just-the-first-collection-of-text/59435/3 "2024-11-03T08:05:52Z")

</div>

> [@samliew](#):
>
> `{{ join(map(55.array; text); " ") }}`

Thank you Sam, it worked!

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [November 3, 2024, 1:52pm UTC](https://community.make.com/t/put-all-the-collection-from-an-array-as-input-not-just-the-first-collection-of-text/59435/4 "2024-11-03T13:52:51Z")

</div>

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](https://community.make.com/t/make-community-the-ultimate-topic/11682) 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](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/d/5d9b26fbef0fd7385a34084f61cd5b9165786f42.png)

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](https://academy.make.com) will save you lots of time and frustration using Make.

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [November 20, 2024, 4:12am UTC](https://community.make.com/t/put-all-the-collection-from-an-array-as-input-not-just-the-first-collection-of-text/59435/5 "2024-11-20T04:12:05Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


