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

Community site session details

Session Id : QwQeN+IksXByu2HOePLni/
Power Automate - Building Flows
Unanswered

MS Forms to SharePoint list doesn't like image attachments

Like (0) ShareShare
ReportReport
Posted on 8 Apr 2022 09:57:29 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.

I have the same question (0)
  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on 11 Apr 2022 at 15:52:08
    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 11 Apr 2022 at 09:56:12
    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 11 Apr 2022 at 08:33:26
    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 11 Apr 2022 at 04:36:40
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete