Parameter Name 'file' is invalid _OCR.space, HTTP_Request

Hello Again, Greetings of the day!!

Here I am directly using a PDF file, which is coming from email as input and trying to send it to OCR.space for extracting the details from it. Here, the execution is successful, but it shows something like this in the image below, and I am not able to see the correct and expected output

u

I am using trial version of n8n and also trying to use the free OCR.space, it’s for individual practice purposes , Can someone help me with this? The PDF attachment consists of invoices, and my further agenda is to extract the information and also use LLM and later load it to the Ochestrator Queue(UiPath)

Thanks in Advance

You are using the file “attachment” wrong.

Here is an example of how you can do this:

Notice the parameter type is n8n Binary file, the name is file and the value is data.

Thanks fro the reply but here i am passing the file without savig it, its trail version so no option to save the files locally, so i bypassed it and directly pushing the attachment to HTTP request with API of OCR.Space,

is it logically right?

what you are doing is logically correct.

This, however, makes no difference to the example I provided earlier, the source of the binary is irrelevant. If it comes from the email node, it is still a binary, which you can push (in exactly the same manner) to the OCR through the HTTP Request node.

1 Like

:folded_hands: You are a saver!! Thank you so much, I was wasting my time on claude, Chatgpt and all the GenAi asking this question and finally, a human helped me :sweat_smile:

Thank you so much @jabbson

1 Like

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