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

Hello Make.com Community!

I’m facing a challenge with converting a PDF to a CSV file using OpenAI and 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.

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.

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


Thanks in advance!

Best regards, Allan

blueprint (3).json (14.9 KB)

Welcome to the Make community!

You probably could just use the built-in function toString in the Parse CSV module.

e.g.:

{{ toString(16.body) }}

For more information, see the function documentation in the Help Center.

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 Basics

Articles & Videos

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

3 Likes

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

1 Like