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 Automate - Building Flows
Unanswered

Taking Image Submissions from Forms, Renaming and Moving Files in OneDrive

(0) ShareShare
ReportReport
Posted on by

I am looking to create a flow that does the following:

There is form where a Shipment Number and image files are uploaded. I want to when a new response is recorded to take the image files from where Forms saves them and rename them to the Shipment Number that was recorded for the submission and move them to another folder. I can't find any online advice on how to do this.

 

Files go to: /Apps/Microsoft Forms/Claims & Customer Complaints/Claims Images

I want them copied or moved to /Desktop/Industrial Engineer/IE-Communal/Claims & Customer Complaints Supporting Documents

 

but renamed with the shipment number for EACH file uploaded with the submission. Shipment Number_1 or something for duplicates is fine.

 

I have the same question (0)
  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: Taking Image Submissions from Forms, Renaming and Moving Files in OneDrive

    You don't have an option to rename the files when you copy or move them.  But you can retrieve the file contents and then create a new file with that content and whatever name you want in the new location.  Then delete the old file.

  • Community Power Platform Member Profile Picture
    on at
    Re: Taking Image Submissions from Forms, Renaming and Moving Files in OneDrive

    Hi @Pstork1 

     

    How would I do that? What is the syntax or steps that are needed to. When the forms submission has multiple images and I need them all renamed in a new location. Can that be done with retrieving the file contents and creating new files, if so how?

     

    Thanks

  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: Taking Image Submissions from Forms, Renaming and Moving Files in OneDrive

    Here's an example. 

    1. Form is submitted triggers the flow
    2. Get Response Details from the form
    3. Parse the REsponse Details to get the Ids of the files that were uploaded.
    4. Initialize a variable as a counter
    5. For each file
      1. Get the content
      2. Increment the counter variable
      3. Create a new file using the content and a filename created by concatenating the name you want to use with the counter variable.

    image.png

    image.png

  • Community Power Platform Member Profile Picture
    on at
    Re: Taking Image Submissions from Forms, Renaming and Moving Files in OneDrive

    @Pstork1 

     

    Thank you, I got it all to work except that when it puts the file in the new location the type is just "File" instead of like a JPEG or PDF. How can I fix this/where in the flow and codes is this found? 

    Results.JPG

    Thanks for how much you've helped!!

  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: Taking Image Submissions from Forms, Renaming and Moving Files in OneDrive

    When specifying the file name in the Create File action make sure you attach the appropriate file extension.  Otherwise, OneDrive doesn't know how to handle the file and the browser doesn't know what program to use to open it.

  • msweeney2 Profile Picture
    4 on at
    Re: Taking Image Submissions from Forms, Renaming and Moving Files in OneDrive

    This worked great.  Thank you!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard