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 / RENAME ATTACHMENTS UPL...
Power Automate
Answered

RENAME ATTACHMENTS UPLOADED FROM MS FORMS AND SEND EMAIL

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I need to create a flow where when a file is uploaded using MS forms, through Powe automate an email would be generated with the attachment also in that email.

 

But the file needs to be renamed using the answers provided from the MS forms.

Ex: 

Question 1> First Name

Answer> Sam

 

Question 2> Last Name

Answer> Peter

 

Question 3> Please upload a photo

Answer> User uploads a photo

 

When the email is sent attaching the photo uploaded it needs to be renamed as "Sam_Peter". Where as the file name needs to be extracted from the answers provided in the MS Forms questions. The file needs to be saved in One Drive also.

 

I already have a process in place where a mail is generated by extracting the file uploaded in MS forms, but the issue is i need support on how to rename the file accordingly as above requested. 

Categories:
I have the same question (0)
  • mfazilm Profile Picture
    52 on at

    @trice602  @ScottShearer  @ManishSolanki @SudeepGhatakNZ  need your help guys

  • Verified answer
    trice602 Profile Picture
    16,244 Super User 2026 Season 1 on at

    Hi @mfazilm / @Anonymous ,

     

    Here's a working flow you can make you own.

     

    trice602_0-1705251517426.png

     

     

    The form:

     

    trice602_1-1705251543755.png

     

     

    After your get response details, you need to parse JSON action to get the details of the file upload question.  Run the flow and get the json out of the file upload question.  Copy.

     

    Shown below:  Get response details run output.

     

    trice602_2-1705251644561.png

     

    Next in your parse json action, select the file upload question for the content, and then click generate from sample button and paste in your json from the previous step.  Your action should look similar to below.

     

    trice602_3-1705251715752.png

     

     

    Next add a get file content, and select the fileID from your parse json action.  Notice this will wrap itself in an apply to each even though there will only be one file upload, don't worry to much about this.

     

    trice602_4-1705251811473.png

     

    Next add your send email action... with the attachment details shown below.

     

    trice602_5-1705251844130.png

     

    Last step, create your file.

     

    trice602_6-1705251976784.png

     

     

    trice602_7-1705252001300.png

     

    trice602_8-1705252021292.png

     

     

  • trice602 Profile Picture
    16,244 Super User 2026 Season 1 on at

    Hi @mfazilm / @Anonymous ,

     

    Previously this dynamic content was not available in the new designer and is why this is shown in classic.  Switch to classic for this flow (only body/value is available in the new designer).

     

    trice602_0-1705252236147.png

     

     

     

  • mfazilm Profile Picture
    52 on at

    Thank you, Trice, for the quick response.

     

    However, I have tried it but it didn't work since I have uploaded a excel file and he file format didn't show accordingly.

     

    below is how the file is shown once the email has been generated.

     

    mfazilm_0-1705252713027.png

     

  • trice602 Profile Picture
    16,244 Super User 2026 Season 1 on at

    Hi @mfazilm ,

     

    You said you were uploading photos, not excel files.  In my example, you can see mine is hard-coded as .jpg.  You can change as needed.

     

     

     

     

  • mfazilm Profile Picture
    52 on at

    Thank you for the support, now it worked. 

  • trice602 Profile Picture
    16,244 Super User 2026 Season 1 on at

    Hi @mfazilm ,

     

    Nice!  Always glad to see these responses! This is a FAQ - please mark as a solution to help others find it!

     

     

     

     

  • carlosdavids5 Profile Picture
    7 on at

    @trice602  what can I do if I want to upload more than one attachment in one email using this flow? The Flow works fine however, when I try to upload more than one attachment it will send it in a separate email.   Thank you in advance

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 464

#2
Haque Profile Picture

Haque 431

#3
David_MA Profile Picture

David_MA 323 Super User 2026 Season 1

Last 30 days Overall leaderboard