# 404 error calling OpenAI assistant with variable number of file IDs

**URL:** <https://community.make.com/t/404-error-calling-openai-assistant-with-variable-number-of-file-ids/33581>\
**Category:** Questions\
**Tags:** open-ai\
**Created:** [April 12, 2024, 5:24am UTC](https://community.make.com/t/404-error-calling-openai-assistant-with-variable-number-of-file-ids/33581 "2024-04-12T05:24:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![colinkimble](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@colinkimble](https://community.make.com/u/colinkimble)\
**Post date:** [April 12, 2024, 5:24am UTC](https://community.make.com/t/404-error-calling-openai-assistant-with-variable-number-of-file-ids/33581/1 "2024-04-12T05:24:04Z")

</div>

I’m experiencing the same problem as discussed within this post but the solution isn’t working for me.

**Updated with screenshots**

> [@Call OpenAI assistant with variable number of file IDs](https://community.make.com/t/call-openai-assistant-with-variable-number-of-file-ids/29645/1):
>
> How to pass multiple (!) file IDs to an OpenAI assistant module? Putting in a single file ID is no problem: put in the file ID in the module‘s form field. Passing a specific number of file IDs is not a problem: just „add item“ and put in the next file ID. But how to pass a variable number of file ID? When I switch on „map“ and put in a single file ID it works, wenn I separate multiple with comma or newline it does not work. Should I use JSON? I somewhere found [ { „id“: „some file id“}, … …

I have a local data store containing records with a File ID of each file. I perform a search on the datastore and this retrieves the relevant records I require.

I then use an Array aggregator to populate the records into an array.

As described in the original post, I then call out to OpenAR with the File ID’s mapped as follows:  
{{ifempty(map(73.array; “data.ID”))}}{{null}}

This always returns 404 Files were not found from OpenAI. I’ve verified the file ID’s are correct and it works if I pass one file id at a time.

Looking at the input bundle it looks as follows:

[  
{  
“role”: “user”,  
“tools”: [  
“retrieval”  
],  
“fileIds”: [  
“file-removed, file-removed, file-removed, file-removed, file-removed, file-removed, file-removed”  
],  
“message”: “Files for content are attached.”,  
“threadId”: “removed”,  
“assistantId”: “removed”  
}  
]

Is it expecting the fieldIds to be formatted as follows with the extra "'s?

```
    "fileIds": [
        "file-removed", "file-removed", "file-removed", "file-removed", "file-removed", "file-removed", "file-removed"
    ],

```

 ![Scenario](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/a/8a4ed496212c0b1ae63ba2eb0769e874e6ef291b.png)  
 ![Aggregator](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/e/6e8b8607920bb67ebc4be59711b164fd8b407558.png)

[input-bundle.txt](https://community.make.com/uploads/short-url/eaSzIF6zRb8a6RVzaCXj0kz8GPO.txt) (475 Bytes)  
[bundle.json](https://community.make.com/uploads/short-url/oaNbXBNsIxYPXKtrPy7ibQFYTB5.json) (14 Bytes)

Any help gratefully received.

---

<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:** [April 12, 2024, 6:03am UTC](https://community.make.com/t/404-error-calling-openai-assistant-with-variable-number-of-file-ids/33581/3 "2024-04-12T06:03:13Z")

</div>

Welcome to the Make community!

## 1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:  
 ![Screenshot_2023-10-07_111039](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/0/20b53cdf28d223e85fc9654c350eadebd37f5d3c.png)

## 2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

 ![Screenshot_2023-08-24_230826](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/2/2ff55ee04419049c127f183db2b3eebfbbbbfc64.png)  
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

> blueprint.json (12.3 KB)

## 3. And most importantly, Input/Output bundles

Please provide the **input** and **output** bundles of the modules by running the scenario (or get from the [scenario History tab](https://www.make.com/en/help/scenarios/scenario-execution-history)), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

 ![Screenshot_2023-10-06_141025](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/8/2876156ab3ea5bc9e40bbc0edfb9f025406b7c48.png)

### A.

Save each bundle contents in your text editor as a `bundle.txt` file, and upload it here into this discussion thread.

Uploading them here will look like this:

> module-1-input-bundle.txt (12.3 KB)  
> module-1-output-bundle.txt (12.3 KB)

### B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

- Either add three backticks ````` before and after the code, like this:

- Or use the format code button in the editor:  
 ![Screenshot_2023-10-02_191027](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/4/b485b6572c7a1c438f9b191c54e63d351008304c.png)

Providing the input/output bundles will allow others to _replicate_ what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

---

<div class="post-metadata">

**Author:** ![colinkimble](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@colinkimble](https://community.make.com/u/colinkimble)\
**Post date:** [April 12, 2024, 9:02am UTC](https://community.make.com/t/404-error-calling-openai-assistant-with-variable-number-of-file-ids/33581/4 "2024-04-12T09:02:31Z")

</div>

Thank you Sam, I’ve updated the post with screenshots and the bundles.

---

<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:** [April 12, 2024, 10:42am UTC](https://community.make.com/t/404-error-calling-openai-assistant-with-variable-number-of-file-ids/33581/5 "2024-04-12T10:42:57Z")

</div>

It’s unclear what’s coming out of the data store and what you are iterating.

You should be doing either one or the other.

What about the Scenario blueprint?

---

<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:** [July 11, 2024, 10:49am UTC](https://community.make.com/t/404-error-calling-openai-assistant-with-variable-number-of-file-ids/33581/6 "2024-07-11T10:49:01Z")

</div>


