Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

MS Forms to SharePoint list doesn't like image attachments

(0) ShareShare
ReportReport
Posted on by 1,597 Super User 2024 Season 1

Hello,

 

In my flow below, I am creating a SharePoint list item when a new response is submitted from MS Forms.

 

sudosaurus_0-1649411464991.png

sudosaurus_1-1649411494736.png
Next I am using this JSON schema to parse the attachments from MS Forms before being able to add them to my SharePoint list item. This is working for files such as .txt, .doc, .xls but not working for .jpg, .png - error at bottom of post.

 

{
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 },
 "items": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 },
 "properties": {
 "type": "object",
 "properties": {
 "name": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 }
 }
 },
 "link": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 }
 }
 },
 "id": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 }
 }
 },
 "type": {
 "type": "object",
 "properties": {}
 },
 "size": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 }
 }
 },
 "referenceId": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 }
 }
 },
 "driveId": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 }
 }
 },
 "status": {
 "type": "object",
 "properties": {
 "type": {
 "type": "string"
 }
 }
 },
 "uploadSessionUrl": {
 "type": "object",
 "properties": {}
 }
 }
 },
 "required": {
 "type": "array",
 "items": {
 "type": "string"
 }
 }
 }
 }
 }
}

sudosaurus_2-1649411515773.png

 

When I run the flow, I get thie error on the JSON action:

[
 {
 "message": "Invalid type. Expected Object but got Array.",
 "lineNumber": 0,
 "linePosition": 0,
 "path": "",
 "schemaId": "#",
 "errorType": "type",
 "childErrors": []
 }
]

As mentioned above, this is only occuring for image attachments.

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: MS Forms to SharePoint list doesn't like image attachments

    @v-xiaochen-msft 

    Well it's worked for the Parse JSON step however on the next step (Get file content - OneDrive for Business),
    I am getting this error:

    sudosaurus_0-1649692226540.png

     

    Unable to process template language expressions in action 'Get_file_content_of_MS_Forms_attachments' inputs at line '0' and column '0': 'The template language expression 'body('Parse_JSON_from_MS_Forms_file_upload_attachments')?['items']?['properties']?['id']' cannot be evaluated because property 'items' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

     

  • v-xiaochen-msft Profile Picture
    on at
    Re: MS Forms to SharePoint list doesn't like image attachments

    Hi @sudosaurus ,

     

    If you copy the output and paste it to the 'Parse Json' action ,will it work?

     

    Best Regards,

    Wearsky

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: MS Forms to SharePoint list doesn't like image attachments

    Hi @v-xiaochen-msft 

     

    Here's my upload output:

    [{"name":"710Cr6Lot5L._AC_SL1500__Chris Cundy.jpg","link":"https://ondomain-my.sharepoint.com/personal/powerplatform_livewest_co_uk/Documents/Apps/Microsoft%20Forms/Application%20for%20a%20LiveWest%20Sponsored%20CIH%20Vocationa/Question/710Cr6Lot5L._AC_SL1500__Chris%20Cundy.jpg","id":"01UAWTK6PSUTPYNORUR5AKUFOY6NQMTMWQ","type":null,"size":115366,"referenceId":"01UAWTK6IANOEWSKQWSRHLL4Z3WG72JDM6","driveId":"b!lgB84gaIYEKwmDafJaNZ6teW0qwZWA1FkhEvTL8_nhTXJmYE0_v-RYpJfalqhfI8","status":1,"uploadSessionUrl":null}]

     

  • v-xiaochen-msft Profile Picture
    on at
    Re: MS Forms to SharePoint list doesn't like image attachments

    Hi @sudosaurus ,

     

    The error shows that the output of your form's attachments is an array. But the schema of the 'parse Json' expects an object.

     

    Please copy the outputs of your attachments and paset it here.

    vxiaochenmsft_0-1649651779777.png

     

    Best Regards,

    Wearsky

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1