Skip to main content

Notifications

Community site session details

Community site session details

Session Id : WeHW3ftVMqA0UnjmwMQuz7
Power Automate - Building Flows
Answered

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

Like (1) ShareShare
ReportReport
Posted on 21 Sep 2023 11:32:53 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.

 

 

 

  • CU23090959-0 Profile Picture
    28 on 26 Sep 2024 at 06:40:38
    Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read
    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!
  • Cr1t Profile Picture
    555 on 22 Sep 2023 at 11:10:27
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @conorsanchez 

    You're welcome 🙂

  • conorsanchez Profile Picture
    29 on 22 Sep 2023 at 11:08:35
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @Cr1t 

    Perfect, you're a life saver

    Everything is working as it should.

    Thank you very much! 

  • Cr1t Profile Picture
    555 on 22 Sep 2023 at 10:53:43
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @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 22 Sep 2023 at 10:48:33
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @Cr1t, thanks for the reply again 

    Here it is 

    conorsanchez_0-1695378670781.pngconorsanchez_1-1695379422596.png

     

  • Cr1t Profile Picture
    555 on 22 Sep 2023 at 10:27:30
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @conorsanchez 

    Could you please share the screenshot of your flow? 

  • conorsanchez Profile Picture
    29 on 22 Sep 2023 at 09:41:51
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @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 22 Sep 2023 at 09:30:39
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @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 22 Sep 2023 at 08:13:31
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    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

     

  • Verified answer
    Cr1t Profile Picture
    555 on 21 Sep 2023 at 13:58:00
    Re: Adding Attachments from a Microsoft Form to a Sharepoint list, attachment added but files cannot be read

    @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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,765 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard