0

I'd create a flow in the Power Automate where a new page will be created by an HTTP Request with JSON.

I can replace and set text into the new page via the JSON, but I don't know how I can set the page properties.

4
  • You want to set the page properties or SharePoint site properties? Jun 15 at 13:53
  • The page proberties
    – Christoph
    Jun 16 at 7:54
  • which page properties you are trying to update? Jun 16 at 8:41
  • In the page library I created own column as properties and assinged them as page properties to display them on my pages.
    – Christoph
    Jun 16 at 12:57
1

You can update the page properties using Send an HTTP request to SharePoint action like:

enter image description here

Method: POST

Uri:

_api/web/lists/getbytitle('Site Pages')/items(1)

Headers:

Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
If-Match: *
X-HTTP-Method: MERGE

Body:

{
    "__metadata": {"type":"SP.Data.SitePagesItem"},
    "Title": "Custom title set by flow"
}

Output:

enter image description here

5
  • You mean I should update my new created page in a next step and adding then the properties?
    – Christoph
    Jun 16 at 13:22
  • Yes, you can add one more action & perform update operation as given in my answer. Pass the item ID (in Uri) from dynamic data of previous action used to create a page. Jun 16 at 13:53
  • Hi Ganesh, I tried with your example. But it isn't working. I can set the title but no more other properties. Do you know why?
    – Christoph
    Jun 17 at 9:17
  • Which properties are you trying to set? Are you getting any error (if yes, please post the error message)? Did you create custom columns? If Yes, did you add them to the all content types in "Site Pages" library? Jun 17 at 9:37
  • Also, make sure you are using correct internal name of your columns in request body. Jun 17 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.