cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
colby2
Regular Visitor

AI cannot read text from Sharepoint file made from shared email box flow

Hello I am trying to create a series of flows that create a file in a sharepoint file in a library, then move/ rename file based on text within the file.
I am doing this with 2 flows. All files are essentially the same and are pdf format throughout the process
The first flow simply creates a file from a shared box. See below:

colby2_0-1658855391030.png


The second flow is below:

colby2_1-1658855510106.png

 

And i get the following error:
{"operationStatus":"Error","error":{"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"},"innerErrors":[{"scope":"Record","target":"single","code":"InvalidRecord","type":"Error","properties":{"InnerErrorCode":"InvalidImage","MlIssueCode":"InvalidRecord","MlIssueTarget":"single"}}]}}

Additionally, I did check the link here for a solution but its solution was not successful for me.
https://powerusers.microsoft.com/t5/AI-Builder/PDF-file-created-in-SharePoint-library-from-attachmen...

My second flow works perfectly for pdf files that are dragged and dropped. its just the ones from my first flow that are giving me trouble.


 

1 ACCEPTED SOLUTION

Accepted Solutions
colby2
Regular Visitor

Ok, i think i have solved it!
Essentially, I just turned this into one flow and that mitigated the issue. I'm sure there is a more concise method, but this is working and I am satisfied.

I opted for creating a file temporarily from the email attachment and processing through Sharepoint triggers to retrieve the attachment for the AI builder to process, find the necessary text, create a new file with the desired naming convention and then deleting the initially created SharePoint file.

See below for the finished solution.

The initial trigger was 'When a new email arrives in a shared mailbox (v2)'

colby2_0-1658945248091.png

 

 

View solution in original post

3 REPLIES 3
JoeF-MSFT
Power Apps
Power Apps

Hi @colby2 - thanks for the question.

 

Let's try a couple of things:

  • If you to the SharePoint folder after the flow has created the file. Are you able to correctly open the PDF file? Is there any other file created on the SharePoint folder you were not expecting?
  • For the second flow, try to remove the AI Builder action and replace it with Create file in OneDrive for business for example. If you run again these flows, does the PDF get created correctly in OneDrive and are you able to open it?

 

Hope these steps helps us move closer finding an explanation to what is happening. 🙂

  1. Just tested flow 1, and the file is created, but this maybe the crux of the issue... I get this error upon opening it.
    colby2_0-1658929528710.png

    and online it shows this:

    colby2_1-1658930091847.png

     

  2.  with the above, pt 2 cannot be completed
colby2
Regular Visitor

Ok, i think i have solved it!
Essentially, I just turned this into one flow and that mitigated the issue. I'm sure there is a more concise method, but this is working and I am satisfied.

I opted for creating a file temporarily from the email attachment and processing through Sharepoint triggers to retrieve the attachment for the AI builder to process, find the necessary text, create a new file with the desired naming convention and then deleting the initially created SharePoint file.

See below for the finished solution.

The initial trigger was 'When a new email arrives in a shared mailbox (v2)'

colby2_0-1658945248091.png

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,772)