Pass a Binary file as it is

I am trying to upload a file to Openai and Claude based on some file type extensions. But , Cant pass the binary as it is. Please take a look at my workflow. The old documentation suggests Binary toggle but couldnt figure it out. It would be great if anybody can shed some light on this.

Thanks

hello @Chetan_s

That option will be available once you turn on the option “Include Other Input Fields”

I am getting an error on Code block

Binary file is missing [line 2]. Which means that the file is not being passed from the first block to the 2nd block which is the code block

You are using data as Input Data Field Name in OpenAI3 node, but file in previous nodes.
Actually it is file0.

Field Name for Binary Data (file) is used for all uploaded files. That means the field name doesn’t stay the same as in the original HTTP request.

If you upload more than one file to the same webhook, they will be renamed with numbers:

file0, file1, file2, and so on — instead of keeping their original names from the request.

I also replaced the code nodes with a Set node and additioanally added the files extension in it.
And switched the PDF output with Spreadsheet output of Switch node.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.