Won't download CSV file from Actions GET request

I’m currently working on a custom GPT project where I need to process CSV files retrieved through an API GET request. My goal is to have the GPT manipulate and create visuals from the data within these CSV files. However, it seems to run into issues trying to do this.

While the GPT can access the CSV data it receives from the GET request, it’s not in a directly usable format for manipulation or visualization. To use the data, the GPT rewrites all CSV contents as text and then attempts to convert it back into a CSV format. This process becomes problematic with large CSV files. The GPT struggles to convert large text blocks back into CSV format, often giving up midway through the process.


Could you preprocess the data into another format that would be better suited for creating visuals from the csv data?

Is the use case business analytics? word clouds? something else?

I have seen a few different techniques work to generate visuals from csv data in GPTs and may be able to advise with more specifics on the end goal.

1 Like

Hi Cass,

Thank you for responding. I am using it for business analytics purposes.

The issue, however, is not with how well GPT works with CSVs. When I manually add CSV files to GPT (via drag and drop) it works great and can successfully modify and create visuals from it using code_interpreter.

The issue that I encounter arrises when using GPT Actions to try to retrieve the CSV file via an API request. Ideally, it would download the CSV file, which I can use as a reference, but instead it receives the entire file as text, which makes it difficult to work with.

I also tried using xlsx, but that didn’t seem work at all.

Got it. I did a quick search on the forum threads and have not found an answer for that use case. If I succeed in doing something similar I will definitely post back to this thread.

1 Like

I have the same issue! I made an Action to use an API that returns large CSV files. I was hopping these would be downloaded into the environment used by the code interpreter but instead the CSV contents are inserted into the context window of the GPT. This obviously doesn’t work when the CSV is thousands of rows.

The goal is to have the GPT plot the contents of the CSV returned by the API.

If there’s no way to do this currently, should we make a feature request somehow?


I’ve the same problem and posted more details about it here:

Appreciate any pointers or directions to solve this for Custom GPTs.


1 Like

Not ideal, but as a work around you could upload the csv to a webpage and return the url as a response. GPT will fail to download the csv because code_interpeter can’t as of yet access external urls, but it will provide a link to the csv, which the user can then download and manually put into the GPT prompt.