Hi! So, in my automation, I realized I needed to separate the PDF files from the IMAGE files (JPEG/PNG) sent. I managed to get it working with PDFs, but I’m having problems with the images.
In the “IF” node, I can do the separation, but when it comes time for the HTTP request to extract the image information and transform it into JSON, an error occurs; it seems it’s not recognizing it. I’ve already sent the code several times to different AI systems to see if they could solve it, but so far nothing has worked.
Hi @Companny Welcome to the community!
You can do that by converting your image to base64 like extract from file and then move file to base64 string, and just call that google vision using the HTTP node with it’s content type JSON something like this:
The base64 approach mentioned above is the right call, just make sure the base64 string you’re passing doesn’t have the data:image/png;base64, prefix on it because Google Vision will choke on that. If the Extract from File node gives you trouble you can also grab it with a Code node like $input.first().binary.data.data which gives you the raw base64 string directly, then just drop that into your HTTP Request body JSON under image.content.