web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Saving file to Sharepo...
Power Automate
Unanswered

Saving file to Sharepoint from MS forms/Approval

(0) ShareShare
ReportReport
Posted on by 126

Flow:

When a response is submitted via MS Forms > gets form response > creates approval.

Once approved > file saved to Sharepoint

 

BUT that file is saving as a same textedit format. How do I solve this to save in the original format (PDF,Jpeg, Excel etc)

 

Screenshot 2023-01-17 at 17.35.23.png

Categories:
I have the same question (0)
  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @Jtaylor95 ,

     

    Could you please show your complete flow?
    Have you successfully obtained the attachments uploaded in MSForm?
    If you want to rename the attachment you can try:

    vdezhilimsft_0-1674116505187.png

    vdezhilimsft_1-1674116625879.png

     

    Best Regards,

    Dezhi

     

     

  • Jtaylor95 Profile Picture
    126 on at

    Hi the flow is:

     

    Screenshot 2023-01-19 at 12.01.43.png

    Screenshot 2023-01-19 at 12.01.59.png

    Screenshot 2023-01-19 at 12.02.06.png

     

    Expressions:

    Screenshot 2023-01-19 at 12.02.27.png

     

     

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @Jtaylor95 ,

     

    I noticed that you have saved the files you got from MSform into an array, so you also need to use an Apply to each acton when saving these files.
    Then if you want to rename your files, you can try to use Split() to get the filename suffix.

    vdezhilimsft_0-1674199208926.pngvdezhilimsft_1-1674199246108.pngvdezhilimsft_2-1674199273043.png

    vdezhilimsft_3-1674199302979.png

    vdezhilimsft_4-1674199361126.png

    vdezhilimsft_5-1674199424292.png

     

    Best Regards,

    Dezhi

     

     

  • Jtaylor95 Profile Picture
    126 on at

    Unfortunately I am now getting the following error:

    Screenshot 2023-01-20 at 1.27.01 pm.png

     

    From this setup:

     

    Screenshot 2023-01-20 at 1.10.16 pm.pngScreenshot 2023-01-20 at 1.10.22 pm.png

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @Jtaylor95 ,

     

    This looks like the json in your array is malformed.

    vdezhilimsft_0-1675067608608.png

     

    Best Regards,

    Dezhi

     

  • Jtaylor95 Profile Picture
    126 on at

    I amended the json but getting:

     

    The request failed. Error code: 'InvalidRequestContent'. Error Message: 'The request content was invalid and could not be deserialized: 'Could not find member 'ContentBytes' on object of type 'ApprovalsConnectorFileAttachment'. Path 'attachments[0].ContentBytes', line 1, position 540.'.'.

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @Jtaylor95 ,

     

    Sorry, I forgot that these two actions require different json formats, you can create two arrays with different json formats for different actions.

    vdezhilimsft_0-1675152388767.pngvdezhilimsft_1-1675152405312.png

     

    Best Regards,

    Dezhi

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard