web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 (1)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard