How to Process Invoice Supporting Documents with Power Automate AI
Question details
The user needs to know how to configure an AI model within a workflow to process invoices along with their supporting documents located in SharePoint subfolders.

- Product
- Power Automate
- Device & OS
- not provided
- Scenario
- Automating an invoice processing system where the main invoice and related supporting documents are stored deeply within SharePoint document libraries.
- Observed behavior
- The goal is to successfully retrieve and sequentially process multiple files from a specific SharePoint subfolder using a Power Automate AI model.
Ensure you have the necessary SharePoint site permissions to access the subfolders and an active Power Automate premium license with AI Builder credits available.
Process Subfolder Files using Get Files and Apply to Each
Use the SharePoint 'Get files' action to pull documents from your subfolder, then loop through them with 'Apply to each' to process every file individually using your AI model.
An AI model typically processes one document at a time. To handle multiple supporting documents stored in a subfolder, you must build a flow that retrieves the list of files and iterates through them.
Depending on your SharePoint folder hierarchy, you need to configure the properties carefully so that nested files are successfully identified.
In your Power Automate flow, click 'New step' and search for 'SharePoint'. Select the 'Get files (properties only)' action. Specify your Site Address and Library Name.
Click on 'Show advanced options' in the Get files action. In the 'Limit Entries to Folder' field, browse to or dynamically specify the specific subfolder containing your invoice and supporting documents. Ensure 'Include Nested Items' is set to Yes if applicable.
Add a new step and search for 'Apply to each'. In the 'Select an output from previous steps' field, select 'value' from the dynamic content provided by the 'Get files (properties only)' action.
Inside the 'Apply to each' loop, click 'Add an action'. Search for 'AI Builder' and select your specific model (e.g., 'Extract information from invoices'). Map the file content to the AI model's required input fields.

Manage Your Exported Invoices Seamlessly with WPS Office
While Power Automate handles the complex AI extraction in the Microsoft ecosystem, you still need a reliable tool to review, edit, and organize the resulting Excel reports, Word summaries, and PDF invoices. WPS Office is a highly compatible, lightweight, and free alternative to Microsoft Office that easily handles all your exported document formats.
- 1. Download and Install: Download WPS Office for free from the official website and run the quick installer.
- 2. Open Exported Flow Data: Launch WPS Spreadsheets to open the CSV or Excel files generated by your Power Automate invoice flow.
- 3. Review PDF Invoices: Use the WPS PDF viewer to quickly open and review the original invoice documents side-by-side with your extracted data.

Frequently Asked Questions
Can an AI model process multiple files simultaneously in Power Automate?
Most AI Builder models are designed to process one file per execution. To process multiple supporting documents, you must use an 'Apply to each' control to loop through the files and pass them to the AI model sequentially.
How do I ensure Power Automate looks inside nested SharePoint subfolders?
When using the 'Get files (properties only)' action, open the advanced options and set 'Include Nested Items' to 'Yes'. This ensures the flow retrieves files from all subfolders within the specified parent path.
Why is my AI model failing to read the supporting documents?
This usually happens if the file format is not supported by the specific AI model, if the file exceeds size limits, or if the flow is passing file properties instead of the actual 'File Content'. Ensure you add a 'Get file content' action inside your loop before feeding it into the AI model.




