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 / Adding Attachments fro...
Power Automate
Answered

Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

(1) ShareShare
ReportReport
Posted on by 29

Hi I've been building a flow which takes a response from a form with an attachment and creates a Sharepoint list item with the attachment attached. However I'm having an issue where the attached files will not open (for pdf) or are unreadable (png). 

Here is the flow 

conorsanchez_0-1695294956541.png

So Initially I was having issues with the get file content step as I've seen in guides that you normally use the get file content from OneDrive. However as we are using a group form the data from the form is being saved in a SharePoint site so I found that I needed to change the step to get the data from that SharePoint site. The issue I'm having is that the SharePoint list where the form data is saved is different to the list where the actual flow occurs. When I point to the place where the attachments are saved the flow does not attach the file to the list item. But when I point towards the SharePoint list with the list item it does get attached, however the file is not readable. 

 

For Context the main SharePoint list is called Cash Sheet which is where the form response gets filled in through the flow

The place where the Form attachment gets saved is called Automation Forms

 

Here is an example of me attempting to open an image 

conorsanchez_1-1695295823551.pngconorsanchez_2-1695295856892.png

 

Also when checking the automation folder with the form attachment data, I'm able to view the files absolutely fine, its just after the attachment step something goes wrong

 

Perhaps there is an issue with the format of those files being attached or maybe its an issue within SharePoint in regards to where the files are saved, I'm not quite sure. Any help would be appreciated.

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    Cr1t Profile Picture
    555 on at

    @conorsanchez 

    Hellp please try these steps. After creating item in sharepoint use a prase JSON. 

    For content: Map your attachment field from MS forms. 

    Schema: To get the schema, click on ‘Generate from sample’ and then provide the ‘get response details’ json code from the output.

    Cr1t_0-1695304334514.png

    After Json use Apply to each 

    In file path, please map the name from JSON. 

     

    Cr1t_1-1695304530011.png

     

    Let me know if this works. 

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • conorsanchez Profile Picture
    29 on at

    Thank you for answering @Cr1t 

    So I've set everything up the way you explained but I'm getting an error with the Parse JSON step

    conorsanchez_0-1695370234159.png

    Just to check I've copied the correct code from get response detail, its this here?

    conorsanchez_1-1695370361672.png

     

  • Cr1t Profile Picture
    555 on at

    @conorsanchez 

    Sorry i think typed it wrong, my bad. please use the below steps to generate the prase JSON schema.

    1. Go to one of your flow runs.

    2. Expand Get response details.

    3. In the upload file question, please copy the schema. 

    Cr1t_1-1695374907324.png

    4. Click on Generate from sample, then paste the schema copied from get response details and click on done.

    Cr1t_2-1695375008321.png

    5. this should create a Schema for you.

    Cr1t_3-1695375029199.png

    Let me know if this works. 

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • conorsanchez Profile Picture
    29 on at

    @Cr1t 

    Perfect, the Parse JSON step now is working.

    However I'm still getting the issue of the attachment being unreadable when attached to the line item

    conorsanchez_0-1695375641128.pngconorsanchez_1-1695375657910.png

     

  • Cr1t Profile Picture
    555 on at

    @conorsanchez 

    Could you please share the screenshot of your flow? 

  • conorsanchez Profile Picture
    29 on at

    @Cr1t, thanks for the reply again 

    Here it is 

    conorsanchez_0-1695378670781.pngconorsanchez_1-1695379422596.png

     

  • Cr1t Profile Picture
    555 on at

    @conorsanchez 

    Under Add attachment to list item, File content is mapped to body of ms froms, please remove that  make sure it is mapped to file content coming from Get file content using path

    Cr1t_0-1695379973105.png

     

    Let me know if this works. 

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • conorsanchez Profile Picture
    29 on at

    @Cr1t 

    Perfect, you're a life saver

    Everything is working as it should.

    Thank you very much! 

  • Cr1t Profile Picture
    555 on at

    @conorsanchez 

    You're welcome 🙂

  • CU23090959-0 Profile Picture
    28 on at
    You can use Power Automate to save Microsoft Forms attachments to SharePoint. If you're looking for more detailed guidance with a step-by-step flow and screenshots, here's a helpful article: Save Microsoft Forms attachments to SharePoint. Hope this helps!

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard