Skip to main content

Notifications

Community site session details
Power Automate - AI Builder
Answered

Invalid input for AI Model

Like (0) ShareShare
ReportReport
Posted on 23 Jun 2022 21:53:56 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:
  • edgarsimoes Profile Picture
    Microsoft Employee on 07 Jul 2022 at 15:22:47
    Re: Invalid input for AI Model

    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

  • Community Power Platform Member Profile Picture
    on 07 Jul 2022 at 15:11:12
    Re: Invalid input for AI Model

    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 27 Jun 2022 at 17:48:50
    Re: Invalid input for AI Model

    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 27 Jun 2022 at 15:29:46
    Re: Invalid input for AI Model

    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?

  • Community Power Platform Member Profile Picture
    on 24 Jun 2022 at 13:52:51
    Re: Invalid input for AI Model

    @JoeF-MSFT It worked! 

     

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

  • Verified answer
    JoeF-MSFT Profile Picture
    on 23 Jun 2022 at 22:54:09
    Re: Invalid input for AI Model

    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! 

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 > Power Automate - AI Builder

#1
BK-01100935-0 Profile Picture

BK-01100935-0 4

#2
frontrowna Profile Picture

frontrowna 2

#2
Daniel133 Profile Picture

Daniel133 2

Overall leaderboard
Loading started