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 / Taking Image Submissio...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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.

 

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    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
    Microsoft Employee on at

    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
    69,665 Most Valuable Professional on at

    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
    Microsoft Employee on at

    @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
    69,665 Most Valuable Professional on at

    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

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard