How to Upload Multiple Power Apps Attachments to One SharePoint Item
Question details
The user wants to upload multiple file attachments from Power Apps and attach all of them to a single new SharePoint list item, avoiding the creation of separate list items for each file.
- Product
- Power Apps and SharePoint
- Device & OS
- not provided
- Scenario
- Submitting a form or data collection via Power Apps that includes multiple file attachments intended for a SharePoint list.
- Observed behavior
- Using the ForAll function creates a separate SharePoint list item for each attachment, whereas using First or Last only uploads a single file to the item.
Ensure you have the necessary permissions to create and trigger Power Automate flows, as well as edit access to the destination SharePoint list.
Use a Power Automate Flow to Process Attachments
Since Power Apps' native ForAll function iterates and creates new items per file, you must use a custom Power Automate flow to first create the single SharePoint item, then loop through the files to attach them to that specific item.
To achieve this, you need to pass the attachment data from Power Apps to Power Automate as a JSON array. The flow will handle the creation of the list item and subsequently append each file to it using the generated Item ID.
In Power Apps, use the JSON function to convert your attachment control's output into a JSON string so it can be passed to Power Automate.
Go to Power Automate and create a new Instant Cloud Flow triggered by Power Apps (V2). Define a text input parameter to receive the JSON string.
Add the SharePoint 'Create item' action to generate the single target list item in your destination SharePoint list.
Use the 'Parse JSON' action on the data passed from Power Apps. Then, add an 'Apply to each' control to iterate through the parsed attachment array.
Inside the 'Apply to each' loop, add the SharePoint 'Add attachment' action. Use the Item ID from the 'Create item' step, and map the File Name and File Content from your parsed JSON data.
Looking for a Simpler Way to Manage Documents? Try WPS Office
While Power Apps and SharePoint require complex Power Automate workflows just to handle multiple document attachments, WPS Office offers a straightforward, lightweight, and free solution for managing all your daily documents. Enjoy high compatibility with Microsoft formats without the steep learning curve.
- 1. Visit the WPS Website: Go to the official WPS Office website to find the correct version for your operating system.
- 2. Download and Install: Click the Free Download button and follow the simple on-screen instructions to install the suite.
- 3. Manage Documents Seamlessly: Open the application to start creating, editing, and managing your documents and attachments without complex setups.

Frequently Asked Questions
Why does ForAll create multiple SharePoint list items in Power Apps?
The ForAll function iterates through a table (such as an attachment control's output) and executes the Patch function for every single record individually. This naturally results in a distinct SharePoint list item being created for each attachment.
Can I use the Patch function to save multiple attachments without Power Automate?
While it is technically possible to Patch multiple attachments directly to an existing SharePoint item using a complex form submission process in Power Apps, creating a brand new item and attaching multiple files simultaneously usually requires a Power Automate flow to ensure reliable execution.
How do I pass multiple attachments from Power Apps to Power Automate?
You can convert the attachment control's output into a JSON string using the JSON() function within Power Apps. Pass that string as a text parameter to your Power Automate flow, and then use the Parse JSON action in the flow to extract the individual file names and their base64 contents.




