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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Invalid input for AI M...
Power Automate
Unanswered

Invalid input for AI Model

(0) ShareShare
ReportReport
Posted on by

Hello.

I am running into issues with the AI model 'Extract information from forms.' I have trained the model and have successfully used it in a Flow to extract the pdf data and copy it into an excel file. However, I am now trying to apply it to multiple files located in a specific folder. 

johneric1994_0-1656021148349.png

I am getting an error that the input for the AI model is invalid. The model worked on the files when testing but for some reason will not work when listing the files from a folder.

Categories:
I have the same question (0)
  • Verified answer
    JoeF-MSFT Profile Picture
    on at

    Hi @Anonymous, you almost got it! There's just one step left. 🙂 You need to add a Get file content action before the AI Builder Extract information from forms action. It should look like this:

     

    JoeFMSFT_0-1656024676166.png

     

    Let us know once you get the automation running! 

  • Community Power Platform Member Profile Picture
    on at

    @JoeF-MSFT It worked! 

     

    Thank you, Joe. You're a life saver.

  • Community Power Platform Member Profile Picture
    on at

    Hi Joe. The flow is working but now it is duplicating line items from the invoices it is processing. 

    johneric1994_0-1656343629744.png

    The excel file has 7,000+ entries when the flow finished and it should be well below 1,000. It looks like the flow duplicated each line item 10+ times through its run. Is there an issue with the Apply To Each step? Could you help me figure this one out?

  • edgarsimoes Profile Picture
    Microsoft Employee on at

    Hello, @Anonymous 

     

    I see @JoeF-MSFT already helped you troubleshooting your issue regarding the content input.

     

    About the reason you're facing with duplication of lines is because of the 'Line items entries' that you're getting from a table in your invoices. You can't write multiple entries in one row without creating a unique variable to avoid a new 'apply to each' situation.

     

    You can see in the following images, what happen when you use list folders and then add an table input from an invoice:

    Case1.pngCase2.png

     

    To best help you resolve this and to avoid that duplication, please consider this documentation:

    Use the document processing model in Power Automate - AI Builder | Microsoft Docs

     

    If this help you to resolve you're issue, please mark this answer as resolved.

     

    Happy automation,

     

    Edgar Simões

  • Community Power Platform Member Profile Picture
    on at

    Hi Edgar,

     

    I realized that the flow would start running while the files in the uploaded Sharepoint folder were still syncing.  When each file would sync, the flow would restart and loop through the synced files again. I just changed my trigger to start the flow once all of the files were synced and it ran fine!

     

    Thank you

  • edgarsimoes Profile Picture
    Microsoft Employee on at

    Hi @Anonymous Thank you for your update. Yes, that issue can happen a lot because of discrepancys between de syncing and the trigger. So, the manual trigger work best on that scenario. Glad you got it to work as expected.

     

    Happy automating,

    Edgar

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard