Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 6uH59Tpd1499Zu0xIj2rtJ
Power Automate - General Discussion
Answered

AI Builder Recognize text in an image or a PDF document fails to read file

Like (1) ShareShare
ReportReport
Posted on 16 Oct 2024 19:14:04 by 8
I am working on a series of flows that will automate requests by uses to update tax records in our core system.  The business process requires the users to include a screen shot of the current tax rates from an approved website.

I have developed a three-flow solution.
Flow 1 monitors MS forms for new submissions and copies the data to a SharePoint list including the attachment of the required screen shot.  
Flow 2 monitors SharePoint and sends an email requesting approval when new entries are added.
Flow 3 monitors SharePoint for items to be marked as approved, performs some logic, creates a file and triggers importing the file into our core system.

Everything worked great until I got other people involved.  People, what are gonna do, am I right?
It was suggested that we cannot rely on users to spell correctly or enter numbers correctly in the MS form and I was asked if the automation can pull the data from the screen shot attached to the request.

I tested by opening AI Hub in Power Automate,  selecting AI Models then Extract All the Text in Photos and PDF documents.  I uploaded one of the tax rate image files and it worked flawlessly with multiple tests - Yay!
 
I then edited Flow 1 suck that AI Builder will use the file as uploaded to MS Forms as follows:
 
Note the error on the AI Builder action.  I am getting what seems to be the common error:
 
The file submitted couldn't be parsed. This can be due to one of the following reasons: the file format is not supported ( Supported formats include JPEG, PNG, BMP, PDF and TIFF), the file is corrupted or password protected.\",\"properties\":{\"BackendErrorCode\":\"InvalidInferenceInput\",\"DependencyHttpStatusCode\":\"400\"},\"innerErrors\":[{\"scope\":\"Record\",\"target\":\"single\",\"code\":\"InvalidRecord\",\"type\":\"Error\",\"properties\":{\"InnerErrorCode\":\"InvalidImage\",\"MlIssueCode\":\"InvalidRecord\",\"MlIssueTarget\":\"single\"}}]},\"predictionId\":null}"}}
 
Again, the exact same file worked when uploaded directly to AI Builder.  I have confirmed that the file format is PNG.
 
I then updated Flow 2 in order to use the file attached to Sharepoint.  My first attempts failed with an error that the attachment did not exist and may have been deleted.  I know that timing is a major issue in automations so I added a second action to get the SharePoint attachment and this succeeded.  However, when the AI Builder action is triggered I am getting the same error as above.
Flow 2:
Get Attachments 2 is using the ID of the item that triggered the flow.
The AI Builder action is using the ID from the Get Attachments 2 action.
 
If you have read this far, I appreciate your time and I will be grateful for any insight you can offer.
Categories:
  • MS-25091759-0 Profile Picture
    8 on 18 Oct 2024 at 13:50:07
    AI Builder Recognize text in an image or a PDF document fails to read file
    @takolata1
     
    I thought I was doing something wrong there!   Thanks for setting me straight.
  • Verified answer
    takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 17 Oct 2024 at 16:34:21
    AI Builder Recognize text in an image or a PDF document fails to read file
    You need to use the Get attachment content action
  • MS-25091759-0 Profile Picture
    8 on 16 Oct 2024 at 20:10:54
    AI Builder Recognize text in an image or a PDF document fails to read file
    @takolata1
     
    There is no file content output from the Get Attachments action.
    I have tried the AsoluteUri output option with the same results.
  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 16 Oct 2024 at 19:40:21
    AI Builder Recognize text in an image or a PDF document fails to read file
    Wait, are you always entering the Id into the Recognize text action?
    Have you tried entering the file content in the action?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,776 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started