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 Automate
Unanswered

CanvasContent1

(0) ShareShare
ReportReport
Posted on by 8

Good Morning,

 

I am trying to edit the content of websitepages with the sharepoint Rest Api.

Since these are lists, I tried using the validateItemUpdate for the canvasContent1 formValue, but since the html ist much longer then 255 chars, this fails.

Is there a way to do this? I'm struggeling with Rest Api concerning the whole List vs. Page problem.

 

Thanks 😉

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

    Hi @inovatoor,

     

    Normally you can use the SavePage or SavePageAsDraft methods for this.

    _api/SitePages/Pages(3)/SavePageAsDraft

     

    Also have a look at the new Pages API methods, those are useful as well:

    https://learn.microsoft.com/en-us/graph/api/sitepage-create?view=graph-rest-beta&tabs=http

     

  • inovatoor Profile Picture
    8 on at

    Thanks for the reply.
    Hm, I tried that, without much luck ...
    Maybe I got the post request wrong. I will try again 🙂

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

    Hi @inovatoor,

     

    Let us know about your progress. If it still fails please share an example screenshot of your flow setup and the specific error message.

     

    This way we can see which Body payload you are using in the Send an HTTP request to SharePoint action and this will help troubleshooting.

  • inovatoor Profile Picture
    8 on at

    I still get an error: 409 - conflict

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

    Hi @inovatoor,

     

    Can you use a different for the type property? Try using SP.Publishing.SitePage instead of SP.Data.SitePagesItem.

     

    Btw, I would also suggest to change the Content-Type header to 'application/json;odata=verbose'. Because you are including metadata in your body.

     

    {
     "__metadata": {
     "type": "SP.Publishing.SitePage"
     },
     "CanvasContent1": "@{outputs('Compose')}"
    }

     

  • inovatoor Profile Picture
    8 on at

    Sadly that wasn't the problem ...

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

    Hi @inovatoor,

     

    Thanks for checking.

     

    Can you share the CanvasContent1 json value (what you are using in your Compose outputs action)?

     

    It would be useful to see which controls and web parts you are using in that payload, since the json can become pretty complex and a mistake in there is easy to make.

     

    Since you are getting a HTTP 409 it might be worth checking if your page is currently published and not being edited while you try and edit it as well with the Power Automate cloud flow.

     

    Also have a look at for example this thread where I used a similar approach. As you can see in that example you can also try and checkout the page first, before you try and edit/save it with the flow and publish it. 

    https://powerusers.microsoft.com/t5/Building-Flows/Changing-SharePoint-Quick-links-via-Power-Automate-HTTP/m-p/1671247

     

  • inovatoor Profile Picture
    8 on at

    That might be a problem. My flow actually creates a copy of a template (I want my team to be able to change the template). After that the flow gets the content by http request.
    But this problem has to wait for the moment. Thanks for the help so far 😉

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