The issue is not related to my AI Builder license or credits. The error InvalidImage happens because the “Recognize text in image or document” action is not receiving the actual file content in the expected format.
In my original flow I was passing the file ID or path, but AI Builder requires the binary content of the PDF converted to base64.
To confirm this, I created a minimal test flow:
-
Manual trigger
-
Get file content (from SharePoint/OneDrive, selecting a specific PDF)
-
Recognize text in image or document with the Image field set to the expression:
base64(body('Get_file_content'))
-
Compose to display the OCR output
With this setup, the error disappears and the OCR returns the text correctly.
So the root cause is how the file is referenced inside the flow. The solution is to always use Get file content and pass its output (converted to base64) into the AI Builder action.
I am attaching a Word document with the flow opened and configurations visible so you can see exactly how it is set up.
ESPAÑOL
El flujo falla porque la acción Reconocer texto en imagen o documento no recibe el contenido binario del PDF en el formato correcto.
La solución es usar primero la acción Obtener contenido de archivo y luego pasar ese binario al campo Imagen con la expresión:
base64(body('Obtener_contenido_de_archivo'))
Con un flujo mínimo (disparador manual → obtener contenido de archivo → AI Builder OCR → Compose) el error desaparece y el OCR devuelve el texto.
El problema no está en la licencia ni en los créditos, sino en cómo se referencia el archivo dentro del flujo.
Adjunto en un Word el flujo de prueba con las configuraciones abiertas para que se vea cómo está armado.