Skip to main content

Notifications

Community site session details

Community site session details

Session Id : WTks39nXAs7uxGeUCvaG2u
Power Automate - General Discussion
Answered

Help with correcting metadata usage for SharePoint image columns

Like (0) ShareShare
ReportReport
Posted on 24 Mar 2021 16:47:30 by 299

I'm using the HTTP Request to SharePoint action to send a photo from Microsoft Forms to my SharePoint list.  

I'm outputting the following __metadata for this action....

 

{
 '__metadata': {
 'type': 'SP.Data.Healthy_x0020_Recipe_x0020_Submissions_x0020_DevListItem'
 },
 'Photos':
 {
 '__metadata': {'type': 'SP.FieldUrlValue'},
 'Url': 'http path to my image'
 }
}

 

...but Power Automate is complaining and telling me that....

 

The type 'SP.FieldUrlValue' was found to be of kind 'Complex' instead of the expected kind 'Primitive'."

 

Is there something wrong with my metadata setup above? Maybe I'm missing something..? or have too much of something...?

 

  • Verified answer
    CU09091757-0 Profile Picture
    299 on 24 Mar 2021 at 19:06:25
    Re: Help with correcting metadata usage for SharePoint image columns

    Many many thanks for helping me solve my problem!

    After you corrected me the first time, I now learned that the "Primitive type" error was relating to the column type I had in my SharePoint list.  I thought this whole time I had Hyperlink or Picture as a type on my column. But it wasn't.  It was Thumbnail.  I went ahead and created a new column as Hyperlink or Picture, and Power Automate is loving it like McDonalds.

     

    Many thanks!

  • Expiscornovus Profile Picture
    31,652 Most Valuable Professional on 24 Mar 2021 at 18:45:13
    Re: Help with correcting metadata usage for SharePoint image columns

    Hi @kensley,

     

    Can you share a screenshot or describe what type of column the Photos one is? Is it a hyperlink type like in my example below, or is it a different type?

     

    hyperlinkcolumn.png

  • CU09091757-0 Profile Picture
    299 on 24 Mar 2021 at 18:24:52
    Re: Help with correcting metadata usage for SharePoint image columns

    Thanks.  I tried the following....

     

     

    {
     "__metadata": {
     "type": "SP.Data.Healthy_x0020_Recipe_x0020_Submissions_x0020_DevListItem"
     },
     "Photos": {
     "Url": "https://....jpg",
     "Description": "Tomato"
     }
    }

     

    But the error is now...

     

    {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"An unexpected 'StartObject' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected."}}}

    I wish I knew what that meant...

     

  • Expiscornovus Profile Picture
    31,652 Most Valuable Professional on 24 Mar 2021 at 17:30:11
    Re: Help with correcting metadata usage for SharePoint image columns

    Hi @kensley,

     

    I believe with an url field you need to set both the url and the description properties of that field.

     

    Can you try something like this for the body?

    In the example below ImageUrl is the name of the field. Change that with your internal field name.

    {
     "__metadata": {
     "type": "SP.Data.Healthy_x0020_Recipe_x0020_Submissions_x0020_DevListItem"
     },
    "Title": "Test",
    "ImageUrl": {"Url": "https://upload.wikimedia.org/wikipedia/commons/8/89/Tomato_je.jpg", "Description": "Tomato"}
    }

     

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 > Power Automate - General Discussion

Overall leaderboard