PDF Upload to openAI

I am trying to upload a PDF and query the PDF with openAI.  

My current workflow is as follows:

- On trigger download file
- Upload file to openAI
- Message openAI passing in the fileID from the upload as a variable

It doesn't seem like the openAI messaging can find the actual file

Thanks for any suggestions. 

Hey @jszwwe hope all is well. Welcome to the community.

Here is an example of uploading a file and asking the model about it:

As you can see two calls are made - first to upload the file and second to ask the model a question while referencing the file id.

Awesome thank you. One change I needed to make was to add the .pdf extension to the download step. Without it, GPT5 seemed to get confused on the file type.

Perfect, glad it worked for you.
If you found this answer helpful, kindly mark it as a Solution, so it can help others. Thank you.

Cheers!