web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Passing Multiple Files...
Power Apps
Unanswered

Passing Multiple Files from Power Apps to Power Automate

(0) ShareShare
ReportReport
Posted on by 21
I have a Power App that allows the user to add to an attachments collection. The collection takes the contents of attAttachments (attachments control) and adds it to the collection after the add button is pressed using 
 
    Collect(colAttachmentsBase64,
        ForAll(attAttachments.Attachments,
        {
            Name: ThisRecord.Name,
            ContentBytes: JSON(ThisRecord.Value, JSONFormat.IncludeBinaryData),
            ItemID: pItemID
        }
    )
    );  
 
I then pass the collection to Power Automate using 
      CSUStoSharepoint.Run(JSON(colAttachmentsBase64));
 
The problem seems to be that once it gets to Power Automate, the ContentBytes text is referring to the file in the apps memory
instead of the actual file contents.I want to be able to store the files as attachments to a sharepoint list item, so I need
the actual file here. Here is the output of a compose action showing the JSON:
 
"[{"ContentBytes":"\"appres://blobmanager/64a39917bb044b6b94ec3529f5d0c9a2/3\"","ItemID":4,"Name":"6inch pretest MTRS.pdf"},
{"ContentBytes":"\"appres://blobmanager/64a39917bb044b6b94ec3529f5d0c9a2/6\"","ItemID":6,"Name":"L3101 ASBUILT REV1.pdf"},
{"ContentBytes":"\"appres://blobmanager/64a39917bb044b6b94ec3529f5d0c9a2/6\"","ItemID":7,"Name":"L3101 ASBUILT REV1.pdf"},
{"ContentBytes":"\"appres://blobmanager/64a39917bb044b6b94ec3529f5d0c9a2/7\"","ItemID":7,"Name":"MTRS_Pretest.pdf"},
{"ContentBytes":"\"appres://blobmanager/64a39917bb044b6b94ec3529f5d0c9a2/7\"","ItemID":8,"Name":"MTRS_Pretest.pdf"},
{"ContentBytes":"\"appres://blobmanager/64a39917bb044b6b94ec3529f5d0c9a2/8\"","ItemID":8,"Name":"L3101 ASBUILT REV1.pdf"},
{"ContentBytes":"appres://blobmanager/64a39917bb044b6b94ec3529f5d0c9a2/8","ItemID":9,"Name":"L3101 ASBUILT REV1.pdf"}]"
 
How can I work around this? I saw one example that used an image control in a gallery to get the actual file contents,
but in my case it could be any file type (.docx, .pdf, .jpg) etc.
 
Categories:
I have the same question (4)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 955

#2
11manish Profile Picture

11manish 652

#3
Valantis Profile Picture

Valantis 626

Last 30 days Overall leaderboard