Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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.

  • Verified answer
    v-LilyW-msft Profile Picture
    on at
    Re: Failed to recognize text in attachments from emails

    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1