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

Community site session details

Session Id : bEXoqTy5tVWVYhhHOz5ndE
Power Automate - Using Flows
Unanswered

How would one unpublish a SharePoint page using Power Automate

Like (0) ShareShare
ReportReport
Posted on 14 Feb 2025 08:45:55 by

I've been looking for a way to unpublish a SharePoint page using Power Automate, but so far, I haven't found any out-of-the-box actions that seem to do the job.

I came across some posts suggesting the /unpublish HTTP request, but in my case, it throws this error:
"Cannot find resource for the request unpublish."

Has anyone successfully automated unpublishing pages via Power Automate? Any insights or workarounds would be greatly appreciated!

#SharePoint #PowerAutomate #Automation #Microsoft365

  • RobElliott Profile Picture
    10,166 Super User 2025 Season 2 on 15 Feb 2025 at 10:31:46
    How would one unpublish a SharePoint page using Power Automate
    Yes this is quite easily do-able. In the image below the news item has been changed from Published (Promoted State = 2) to Unpublished (Promoted State = 0)

     
    I've put the ID of the page into a variable varID.
     
    In your flow add a Send an HTTP Request to SharePoint action with:

    Method: POST
    Uri: _api/Web/Lists/GetByTitle('Site Pages')/Items(@{variables('varID')})

    Headers - accept  - application/json;odata=verbose

    Headers - content-type - application/json;odata=verbose

    Headers - If Match - *
    Headers - X-HTTP-Method - MERGE

    Body - { '__metadata':{'type':'SP.Data.SitePagesItem'},'PromotedState':0 }


     

     

     

    Rob
    Los Gallardos

    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow
Loading complete