0

I'm trying to update a modern SharePoint Image column in a custom list from a Power Automate flow using the Send an HTTP request to SharePoint action. The goal is to upload or reference an image stored in a document library, and assign it to the list item’s Image column, so that it becomes visible in both SharePoint and Power Apps.

✅ Setup: List name: Custom list with an Image column named ImagePreviewThumbnail

Image column type: Created using “Add column > Image” (not hyperlink or text)

Image location: Stored in a document library

Power Automate flow: Uploads the image using Create file

Gets metadata using Get file metadata and Get file properties

Then tries to update the list item using HTTP request

JSON body I’m sending:

{
  "__metadata": {
    "type": "SP.Data.MyCustomListListItem"
  },
  "ImagePreviewThumbnail": {
    "type": "thumbnail",
    "fileName": "image.jpg",
    "serverUrl": "https://[tenant].sharepoint.com",
    "serverRelativeUrl": "/sites/[site-name]/Shared Documents/folder/image.jpg"
  }
}

Problem: The HTTP request fails with this error:

Unexpected node 'StartObject' was found when reading from the JSON reader. A 'PrimitiveValue' node was expected.

This suggests SharePoint is expecting a primitive value (e.g., string), but I’m sending a structured object as documented for image fields.

Side notes:

  1. The image column is definitely a modern Image column
  2. Manually uploaded images (via SharePoint UI) are visible in Power Apps
  3. Images uploaded via Power Automate are not visible unless uploaded manually or attached
  4. I’ve tried including a uniqueId field (from Get file properties), but it’s not exposed in my environment
  5. Tried both PATCH with IF-MATCH and POST with X-HTTP-Method: MERGE

Question is:

  1. What is the correct way to populate a SharePoint Image column from Power Automate?
  2. Is the object format I’m sending correct?
  3. Is uniqueId required, and if so, how can it be reliably retrieved?
  4. Any altenative how to resolve this problem?
  5. After updating only the Image column, other fields like Title, Description, etc. become empty, how to avoid this ?

Thank you in advance for help and suggestions

1 Answer 1

0

You may need to stringify the image object and send it as a string, like this, i remeber i faced this issue before, where it was working then it break:

{ "__metadata": { "type": "SP.Data.MyCustomListListItem" },"ImagePreviewThumbnai{\"type\":\"thumbnail\",\"fileName\":\"image.jpg\",\"serverUrl\":\"https://yourtena nt.sharepoint.com\",\"serverRelativeUrl\":\"/sites/yoursite/Shared Documents/folder/image.jpg\"}"}

Note how the value of ImagePreviewThumbnail is a string, containing escaped quotes and embedded JSON.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi, I've tried your code (seems to be broken?), it does not work. Code that sort of work is as follows: { "__metadata": { "type": "SP.Data.Doc_x0020_fotograficaListItem" }, "ImagePreviewThumbnail": "{ \"type\":\"thumbnail\", \"fileName\":\"@{triggerBody()?['file']?['name']}\", \"fieldName\":\"ImagePreviewThumbnail\", \"serverUrl\":\"mycompname.sharepoint.com\", \"serverRelativeUrl\":\"@{concat('/sites/SiteB', triggerBody()?['pathToFileOnSiteB'],triggerBody()?['file']?['name'])}\"}" } With this I can see image on sharepoint but no preview in app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.