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 Automate / Group Form file uploads
Power Automate
Answered

Group Form file uploads

(0) ShareShare
ReportReport
Posted on by 113
I have a group form that can have up to 6 participants (a section per participant) and each participant has the option to upload 3 file uploads (as below) - I need to write a power automate that when a new response is submitted it creates a folder for the the group referral and then uploads any file uploads from all of the participants into the folder (there is not always 6 participants and there are not always 3 file uploads per participant)  I have been working on this for weeks without success.  As its a group folder the files are auto stored in share point when the form is submitted - does anyone know how to do this      
Categories:
I have the same question (0)
  • Verified answer
    ninihen Profile Picture
    153 on at
    Do you mean in one form response, you have up to 18 questions that may contain an attached file?
     
    If that's the case, after the trigger "When a new response is submitted", you first find the question id from the output of the trigger. It would look like
    "r3fd62bdf1c134737b28b94e122ec1888": "[{\"name\":\"filename.png\",\"link\":\"https://dummysharepointsitename/Documents/Apps/Microsoft%20Forms/oooo/xxxxx/filename.png\",\"id\":\"01NBVWEIGJJ5HPMDBBDZF2VJ7JCBOYBIWN\",\"type\":null,\"size\":4941,\"referenceId\":\"01NBVWEIG4SKKHDXH2LVDYFM5E6ZTOERDD\",\"driveId\":\"b!TgQk_TvZeEO8B6xFMef2AXM7BVgaEIxMtEKhHudNYmnm4zC5jaJ5S5HTACZhs5gF\",\"status\":1,\"uploadSessionUrl\":null,\"badgerToken\":null}]"
     
    r3fd62bdf1c134737b28b94e122ec1888 is the ID of the question. Because not every participant will upload every file, you need to guard against empty fields, otherwise json() will throw on the first empty one. Use a compose like:

    if(empty(outputs('Get_response_details')?['body/r3fd62bdf1c134737b28b94e122ec1888']), json('[]'), json(outputs('Get_response_details')?['body/r3fd62bdf1c134737b28b94e122ec1888']))
     
    So it returns either a clean json of the attachment, or an empty array if no file was uploaded for that question:
     
    [
        {
            "name": "filename.png",
            "link": "https://dummysharepointsitename/Documents/Apps/Microsoft%20Forms/oooo/xxxxx/filename.png",
            "id": "01NBVWEIGJJ5HPMDBBDZF2VJ7JCBOYBIWN",
            "type": null,
            "size": 4941,
            "referenceId": "01NBVWEIG4SKKHDXH2LVDYFM5E6ZTOERDD",
            "driveId": "b!TgQk_TvZeEO8B6xFMef2AXM7BVgaEIxMtEKhHudNYmnm4zC5jaJ5S5HTACZhs5gF",
            "status": 1,
            "uploadSessionUrl": null,
            "badgerToken": null
        }
    ]
     
    Do it for all 18 questions. Append each result to an array variable.
     
    Then use a For each on the array. Inside the loop, you can use the id field from the JSON with the SharePoint "Get file content" action.
     
    Once you have the file content, use "Copy file" in SharePoint to recreate it in your group's folder. Folder path = the dynamic folder you create per group referral, file name = item()?['name'], file content = the output from Get file content.
     
    Let me know if this makes sense to you.
     
  • michalison Profile Picture
    113 on at
    thank you had to do a few tweeks but it worked

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard