Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Forms uploaded documents into a folder for each responder

(0) ShareShare
ReportReport
Posted on by 25

Hi there folks!

I currently have a Form that is attached to a SharePoint and has multiple file upload questions, currently the uploaded files go into /Apps/Microsoft Forms, then there is a folder for each question and each responder's documents end up in these folders. 

What I would like to do is have a folder for each responder, perhaps naming the folder using the responders name from the Form. I've looked at multiple options online that talk about converting to PDF and then putting in another folder etc, but I can't find a solution for my particular scenario that works. 

Basically, I just want a folder for each responder in SharePoint with all their uploaded documents in it. 

I don't mind if the solution ends up essentially copying the originally uploaded documents to a new location. I just want to get a neat and tidy view. 

Is this achievable with a Flow?


  • philxgriffiths Profile Picture
    25 on at
    Re: Forms uploaded documents into a folder for each responder

    Hi @v-LilyW-msft 

    One other question if you don't mind, if an upload question isn't mandatory on some questions, there may not be a file to copy. Is there a clever way to skip the step and carry on running the flow if no file is found? 

    Or do you think I should have a separate flow for each upload question that isn't a required answer on the Form? Or would it be better to use the 'Configure Run After' option?

    philxgriffiths_0-1647609130943.png

     

     

    Many thanks

    Phil.

     

  • philxgriffiths Profile Picture
    25 on at
    Re: Forms uploaded documents into a folder for each responder

    Hi @v-LilyW-msft 

    Thanks so much for your help on this, I finally got the flow running successfully and I'm getting the documents in the correct folder as expected. 

    It all makes a lot more sense now that we are just talking about SharePoint connectors and a JSON run for each upload. 

     

    Very much appreciated! 

  • Verified answer
    v-LilyW-msft Profile Picture
    on at
    Re: Forms uploaded documents into a folder for each responder

    Hi @philxgriffiths 

    Sorry, my mistake, I ignored that your Form is created in Sharepoint, in this case, the ‘Get file content’ action from OneDrive should be changed to ‘Get file content using path’ action from Sharepoint, and fill in the file path and file name in the ‘File path’ field.

    The 'TestForm' in the path is the name of my test Form.

    vLilyWmsft_0-1647304886638.png

    Best Regards.

     

     

  • philxgriffiths Profile Picture
    25 on at
    Re: Forms uploaded documents into a folder for each responder

    @v-LilyW-msft 

    I've changed the flow to just use 1 upload question, and put through a new response, but I still get the same error. 

    philxgriffiths_0-1647270189875.pngphilxgriffiths_1-1647270229216.png



    I do wonder if I should using a OneDrive connector here though? Is that right or should it be SharePoint?

  • v-LilyW-msft Profile Picture
    on at
    Re: Forms uploaded documents into a folder for each responder

    Hi @philxgriffiths 

    Did you submit a new response, then the Flow was triggered automatically, and then there is an error?

    Best Regards

  • philxgriffiths Profile Picture
    25 on at
    Re: Forms uploaded documents into a folder for each responder

    @v-LilyW-msft Thanks so much for that, I've tried it with only one and I still got the 'file not found' error, I'll repeat for each upload.

     

    Any idea as to why I'm getting the error though?

  • v-LilyW-msft Profile Picture
    on at
    Re: Forms uploaded documents into a folder for each responder

    Hi @philxgriffiths 

    The Content in ‘Parse JSON’ action only one dynamic content from Forms can be placed.

    If you have multiple upload file questions, I'm afraid you need to repeat the Parse JSON and Get file content and Create file steps.

    Best Regards.

  • philxgriffiths Profile Picture
    25 on at
    Re: Forms uploaded documents into a folder for each responder

    Thanks for this @v-LilyW-msft, yep I used the JSON that you provided. Here is the flow as I have it. 

    flow1.pngFlow2.pngErrflow.png

    philxgriffiths_0-1647012164256.png

     



    My JSON is: 

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "name": {
                    "type""string"
                },
                "link": {
                    "type""string"
                },
                "id": {
                    "type""string"
                },
                "type": {},
                "size": {
                    "type""integer"
                },
                "referenceId": {
                    "type""string"
                },
                "driveId": {
                    "type""string"
                },
                "status": {
                    "type""integer"
                },
                "uploadSessionUrl": {}
            },
            "required": [
                "name",
                "link",
                "id",
                "type",
                "size",
                "referenceId",
                "driveId",
                "status",
                "uploadSessionUrl"
            ]
        }
    }


    I've got multiple upload questions, hopefully that's not an issue, but I have tried it with just one too and it still failed. 

    I also tried using the SharePoint connector for 'Get File Content' as all of this is being done in SharePoint, but same result. So I've changed it back to how you had it.

  • v-LilyW-msft Profile Picture
    on at
    Re: Forms uploaded documents into a folder for each responder

    Hi @philxgriffiths 

    Does your fill the id from ‘Parse JSON’ action in ‘Get file content’ action?

    Does your Parse JSON action configured the content I provided it?

    Could you please provide the screenshots of the Flow configuration?

    Best Regards

  • philxgriffiths Profile Picture
    25 on at
    Re: Forms uploaded documents into a folder for each responder

    @v-LilyW-msft  Thanks so much for this, I'm not using Get User Profile section as we aren't validating against that, anyone can fill the form out. I've tried using it without that but it fails. I did change the form to get the users details and it worked fine but still failed on the same step with the file.

    I get an output of: 

     
      "status"404,
      "message""File not found\r\nclientRequestId

    Any ideas? 🙂

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow