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.
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.
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
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
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:
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
Hi Joe. The flow is working but now it is duplicating line items from the invoices it is processing.
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?
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:
Let us know once you get the automation running!
BK-01100935-0
4
frontrowna
2
Daniel133
2