web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Failed to recognize te...
Power Automate
Answered

Failed to recognize text in attachments from emails

(0) ShareShare
ReportReport
Posted on by

Dear community,

 

Currently I'm trying to extract text from pdf attachments in every email that contains attachments as it is shown below:

luchoautomate_0-1631118247908.png

 

However, I get bad request error. 

luchoautomate_0-1631112382236.png

Looking at output information I get the following message: 

{\"type\":\"Error\",\"code\":\"InvalidPredictionInput\",\"message\":\"InvalidImage. 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\"}

 

 I dont know what is wrong, I think the isssue is related to taking attachment file from the email, because I ran a 'instant flow' trigger instead of 'when emails arrives' trigger and It worked fine. So do you have any suggestion? I already tried to use a attachment content instead of attachment item, but I got the same error. 

 

Thanks.

Categories:
  • Verified answer
    v-LilyW-msft Profile Picture
    Microsoft Employee on at

    Hi @luchoautomate 

    I test on my side and can extract text from pdf attachment in an email use When an email arrives trigger.

    You can refer to below screenshots.

    vLilyWmsft_0-1631599031389.png

    vLilyWmsft_1-1631599064653.png

    vLilyWmsft_2-1631599077222.png

    vLilyWmsft_6-1631599914852.png

    When receive an email with pdf attachment, lilywang will receive an email with the text from pdf file.

    vLilyWmsft_5-1631599875839.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 202

#3
David_MA Profile Picture

David_MA 180 Super User 2026 Season 2

Last 30 days Overall leaderboard