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

Notifications

Announcements

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,616 Super User 2025 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

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard