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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Updating SharePoint Pa...
Power Automate
Answered

Updating SharePoint Page content SharePoint API

(0) ShareShare
ReportReport
Posted on by 875 Moderator

Hi,

I want to post News items on SharePoint using PowerAutomate. As I am using different banners for different posts, I've chosen and succeeded in copying a selected template out of the templates to the site pages folder. This solves my earlier problem that custom created pages do not show the banner as a preview thumbnail. 

 

Now after copying the template, I would like to update the content with a new title and some new content. This is how far I got. 

RogierE_0-1672831615159.png

 

But it does not seem to update the title and page content to 'something'. Interestingly enough, the flow runs successfully, but does not update anything:

RogierE_1-1672831753044.png

Anyone has an idea on how to fix this? 

 

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @RogierE,

     

    Can you try the SavePage method with a POST request instead?

     

    URI

     

    _api/sitepages/pages(276)/SavePage

     

     

    Headers

     

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose"
    }

     

     

     

     

     

  • RogierE Profile Picture
    875 Moderator on at

    Thank you for your quick reply! Trying that option led to an error code: 

    RogierE_0-1672839823884.png

    It is a freshly copied page, and so no one could be editing it. And I tried adding a delay of 10 seconds, which sometimes helps, but it didn't work. Any other suggestions? 

  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @RogierE,

     

    Can you try a POST request with a checkout method just before the action with the SavePage? See if that makes a difference?

     

     

    _api/sitepages/pages(276)/checkoutpage

     

     

    And after the SavePage you could use another action with a POST request with the Publish method

    _api/sitepages/pages(276)/Publish

     

  • RogierE Profile Picture
    875 Moderator on at

    Thanks again. It worked, and I learnt a lot about the api. Is there any reference page where I could look up all the possible functions in the API like "checkoutpage" and "Publish" for any future coding challenges ? 

     

    One thing though: it did not solve my original problem, that the thumbnail seems to break when you manually change the Canvascontent1. 

    check out the screen shot of my News Webpart

    RogierE_0-1672844426792.png

    The "something" post where I used your procedure to change the content of the page misses a Thumbnail of the banner, whereas if i just copy the template and do not change the content, it stays. As you can see in the most recent post called "Template-***"

    Any idea's on that? Did I maybe break something with this SavePage body ?

     

    {"__metadata":{"type":"SP.Publishing.SitePage"},
    "Title":"something",
    "CanvasContent1": "[{\"controlType\":4,\"id\":\"a3205408-9b2c-4cc8-a5e2-db21c4142daf\",\"position\":{\"layoutIndex\":1,\"zoneIndex\":2,\"sectionIndex\":1,\"controlIndex\":1,\"sectionFactor\":12},\"addedFromPersistedData\":true,\"innerHTML\":\"something\"},{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true,\"isSpellCheckEnabled\":true}}]"}

     

  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @RogierE,

     

    Properties like TopicHeader & BannerImageUrl are on the same level as the CanvasContent1 property. I see you are missing those in your payload. 

     

    Most of these methods are either in Microsoft Learn docs or you can reverse engineer them by manually editing the page and having a look at the payload in your Developer toolbar in the Network tab.

     

    I would also suggest to start having a look at the new Graph API pages methods:

    https://devblogs.microsoft.com/microsoft365dev/announcing-the-new-sharepoint-pages-api-in-microsoft-graph/

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard