# How to download an output (for instance a CSV) from open-ai API module?

**URL:** <https://community.make.com/t/how-to-download-an-output-for-instance-a-csv-from-open-ai-api-module/44263>\
**Category:** Questions\
**Tags:** open-ai, http, api\
**Created:** [July 2, 2024, 7:28am UTC](https://community.make.com/t/how-to-download-an-output-for-instance-a-csv-from-open-ai-api-module/44263 "2024-07-02T07:28:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allan\_Uytterhoeven](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Allan\_Uytterhoeven](https://community.make.com/u/Allan_Uytterhoeven)\
**Post date:** [July 2, 2024, 7:28am UTC](https://community.make.com/t/how-to-download-an-output-for-instance-a-csv-from-open-ai-api-module/44263/1 "2024-07-02T07:28:22Z")

</div>

Hello [Make.com](http://Make.com) Community!

I’m facing a challenge with converting a PDF to a CSV file using OpenAI and [Make.com](http://Make.com). The conversion works fine when tested in the OpenAI playground, and I get the expected CSV. However, I’m unsure how to download the CSV file via [Make.com](http://Make.com).

Here’s what the body output looks like:

- Body

`50 4b 03 04 14 00 00 00 08 00 00 00 3f 00 61 5d 49 3a 4f 01 00 00 8f 04 00 00 13 00 00 00 5b 43 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d 6c ad 94 cb 6e c2 30 10 45 f7 fd 8a c8 db 2a 31 74 51 55 15 81 45 1f cb 16 a9 f4 03 5c 7b 42 2c 1c db f2 0c 14 fe be 93 f0 50 5b 51 a0 82 4d ac 64 ee dc 73 `

_End of data sample, buffer was originally 5689 bytes long. SHA1: 246803383b860c6722d3c2b7d048132a69cfa6ba_

**Steps I Followed:**

1. Converted a PDF to CSV using OpenAI assistant.
2. Tested it successfully in OpenAI’s playground.
3. The output body contains hex-encoded data (example shown above).

**Problem:** I don’t know how to download the CSV file from this output in [Make.com](http://Make.com).

**Request:** Can anyone guide me on how to decode this hex data or another method to download the CSV file using [Make.com](http://Make.com)? Any help would be greatly appreciated!

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/2/d22aef918df9fc1b1bbe95102e2fa7b60c361ffb.png)  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/0/105fb951cf03569d5e9b4d5da2d4daf7df1d040a.png)

Thanks in advance!

Best regards, Allan

[blueprint (3).json](https://community.make.com/uploads/short-url/gugJP3pXbkrnoS4vrGniU15AqjD.json) (14.9 KB)

---

<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:** [July 2, 2024, 8:28am UTC](https://community.make.com/t/how-to-download-an-output-for-instance-a-csv-from-open-ai-api-module/44263/2 "2024-07-02T08:28:59Z")

</div>

Welcome to the Make community!

You probably could just use the built-in function `toString` in the [Parse CSV](https://www.make.com/en/integrations/csv) module.

e.g.:

```plaintext
{{ toString(16.body) }}

```

For more information, see the function documentation in the [Help Center](https://www.make.com/en/help).

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 —

### General

- [Help Center](https://www.make.com/en/help) | [Tutorials](https://www.make.com/en/help/tutorials.html)
- [Make Academy](https://academy.make.com) – learn Make and get your certificate
- [Discord Server](https://samliew.com/make-discord-invite) – join us in live chat for fans of Make!

### Help Center 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)
- [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 use Regex in Make](https://community.make.com/t/how-to-use-regex-in-make/202)

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the unofficial [Make Discord server](https://samliew.com/make-discord-invite) to chat with other makers!

---

<div class="post-metadata">

**Author:** ![Allan\_Uytterhoeven](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Allan\_Uytterhoeven](https://community.make.com/u/Allan_Uytterhoeven)\
**Post date:** [July 12, 2024, 9:50am UTC](https://community.make.com/t/how-to-download-an-output-for-instance-a-csv-from-open-ai-api-module/44263/3 "2024-07-12T09:50:47Z")

</div>

Hi Samliew, thanks for all the information.  
I eventually found a solution using the OneDrive module.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/2/62156fbe44935a30902486f28c74edbbdc938b95.png)

---

<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 29, 2024, 5:19am UTC](https://community.make.com/t/how-to-download-an-output-for-instance-a-csv-from-open-ai-api-module/44263/4 "2024-07-29T05:19:11Z")

</div>


