# How to format FileIDs in Text Aggregator as clean JSON array for HTTP request?

**URL:** https://community.make.com/t/how-to-format-fileids-in-text-aggregator-as-clean-json-array-for-http-request/84279
**Category:** Questions
**Tags:** set-variable, aggregators, get-map-function, arrays
**Created:** [June 5, 2025, 8:37pm UTC](https://community.make.com/t/how-to-format-fileids-in-text-aggregator-as-clean-json-array-for-http-request/84279 "2025-06-05T20:37:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ReiFel](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@ReiFel](https://community.make.com/u/ReiFel)
#### Post date: [June 5, 2025, 8:37pm UTC](https://community.make.com/t/how-to-format-fileids-in-text-aggregator-as-clean-json-array-for-http-request/84279/1 "2025-06-05T20:37:59Z")

</div>

Hi everyone,

I’m trying to build a flow where I upload multiple files and then send their FileIDs to an OpenAI HTTP request.

I already have all the FileIDs collected in a variable called AllFileIDs. Now I want to use a Text Aggregator to format them as a clean JSON array, like this:

```auto
{
  "file_ids": ["file-abc123", "file-def456", "file-ghi789"]
}

```

But I’m struggling to get the syntax right in the Text Aggregator.

I need each FileID in quotation marks, separated by commas, so the final result can go directly into the HTTP request body.

How can I best achieve this?

Any tips on the correct Text Aggregator settings or alternative approaches would be much appreciated!

Thanks a lot in advance!

 ![Screenshot 2025-06-05 at 22.29.51](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/9/f9c9c21db90930d57f86f165fb9aa0a38fc11c79.jpeg)  
 ![Screenshot 2025-06-05 at 22.29.35](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/8/28d8d055abaf7c6242225c2cf370323664c3619b.jpeg)

---

<div class="post-metadata">

### Author: ![Stoyan\_Vatov](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Stoyan\_Vatov](https://community.make.com/u/Stoyan_Vatov)
#### Post date: [June 6, 2025, 5:50am UTC](https://community.make.com/t/how-to-format-fileids-in-text-aggregator-as-clean-json-array-for-http-request/84279/2 "2025-06-06T05:50:07Z")

</div>

Hey there,

can you share the input bundle as well so we can see what it originally looks like?

---

<div class="post-metadata">

### Author: ![ReiFel](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@ReiFel](https://community.make.com/u/ReiFel)
#### Post date: [June 6, 2025, 8:48am UTC](https://community.make.com/t/how-to-format-fileids-in-text-aggregator-as-clean-json-array-for-http-request/84279/3 "2025-06-06T08:48:52Z")

</div>

Hey Stoyan,  
thanks for your replie.  
The second screenshot is the input bundle.  
so basically I have an unclear amount of “all-file-ids” as an array. (also potentially 0)

---

<div class="post-metadata">

### Author: ![ReiFel](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@ReiFel](https://community.make.com/u/ReiFel)
#### Post date: [June 8, 2025, 11:28am UTC](https://community.make.com/t/how-to-format-fileids-in-text-aggregator-as-clean-json-array-for-http-request/84279/4 "2025-06-08T11:28:13Z")

</div>

The best would even be to get the a JSON in the format which I showed above from this Array aggregator, which has a nested structutre, where the file IDS are separated in pdf-file-ids and other-file-ids. (seen in the screenshot attached)  
What i get from my current text aggregator (in the other attaced screenshot), is just the file names, without exclamationmar, and the 2 “other files” are not even separated with a space.  
How could correct json come out, so i could feed the file IDs to a HTTP request to an OpenAI thread?

Thank you for your help.

 ![Screenshot 2025-06-08 at 13.23.12](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/3/f31b9203588fc5492329fdfe10270be47edf40e2.jpeg)  
 ![Screenshot 2025-06-08 at 13.23.29](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/a/3/a34fa472263ce3a55752e1556984311ec88c4d33.jpeg)

 ![Screenshot 2025-06-08 at 13.23.39](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/c/2c6de978ef07b608f0fc45187d0b8cfa93cd2084.jpeg)

---

<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: [September 6, 2025, 11:42am UTC](https://community.make.com/t/how-to-format-fileids-in-text-aggregator-as-clean-json-array-for-http-request/84279/5 "2025-09-06T11:42:05Z")

</div>


