If you're trying to send attachments from multiple SharePoint items in a single email, you’ve probably noticed that the Get attachments action only accepts one ID at a time. It doesn’t support passing a collection directly, but there’s a standard workaround.
Collect all attachments into an array as the flow runs, then pass that array into the email action at the end.
Steps
1. Initialize an array
At the start of the flow, add an Initialize variable action:
Name: varFiles
Type: Array
Leave it empty
2. Loop through selected items
Use an Apply to each loop over the IDs coming from Power Apps.
3. Get attachments (metadata)
Inside the loop, use Get attachments with the current item ID.
4. Get attachment content
Add a nested loop (since each item can have multiple files), and use Get attachment content to retrieve the file data.
5. Build the array
Use Append to array variable with this structure:
{
Name: DisplayName,
ContentBytes: Attachment Content
}
6. Send the email
After the loops (outside of loop):
Add Send email (V2)
In the attachments field, switch to “input entire array”
Use varFiles
Summary
Since SharePoint attachments are item-based, you need to fetch them per item and aggregate them yourself. Once they’re in an array, sending them in one email becomes straightforward.
✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
👍 Feel free to Like the post if you found it useful.