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 / Upload multiple files ...
Power Apps
Suggested Answer

Upload multiple files to sharepoint libary in a folder defined by a text input.

(1) ShareShare
ReportReport
Posted on by 168
Hi,
Wondering if anyone could help?
 
I'm using Shane Young's videos on Youtube to work out how to pass multiple files using the V2 connector but can't seem to understand how to add these all in one subfolder in my document libary based on a text input called job number.
 
My code is this but how would I would pass the text input just the once and put all the files in my attachment control in a sub folder with the input's name?
 
ForAll(
    AttachControl.Attachments As FILE,
    ServiceJobsDocLibary.Run(
        {
            file: {
                contentBytes: FILE.Value,
                name: FILE.Name
            }
        }
    )
);
Categories:
I have the same question (0)
  • Suggested answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at
    Hi,
     
    Your flow will consist of two parts: first, creating the subfolder, and second, placing all the attachments into it.
     
    Collect all the attachments, transform them into JSON, and send them to Power Automate.
    In your flow, first create the subfolder, then loop through the attachments to add them to the subfolder.
     
    So, it would look something like this: 
     
    ForAll(
        AttachControl.Attachments As FILE,
        Collect(
            ServiceJobsDocLibary,
            {
                file: {
                    contentBytes: FILE.Value,
                    name: FILE.Name
                }
            }
        )
    );
    
     ServiceJobsDocLibary.Run(
       TextInput_JobNumber.Text,
       JSON(ServiceJobsDocLibary) 
     );
     
  • MooseBot88 Profile Picture
    168 on at
    Im not great with JSON but i'm guessing you mean something like this for the flow....

    What would I put in the parse JSON function, then in the apply to each use the body to put into the create file action? Or am I completely wrong?
     
  • MooseBot88 Profile Picture
    168 on at
    Im still struggling with this, anyone able to help me?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard