Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Getting new page url from "Send an HTTP request to SharePoint" News page creation

(1) ShareShare
ReportReport
Posted on by 4
We are working on a flow where a form submission after an approval gets automatically posted to the News section of one of our SharePoint sites. I've already successfully worked out how to create and publish the page, but my issue lies in getting the correct URL to email to the submitter.
 
My 4 steps for initializing and publishing the News Article Post are as below:
 
 
body.d.Id pulls the page ID from the initial HTTP request, however that's sequential for all posts within pages. I know the article saves based on the title in the SavePageAsDraft JSON Payload but if it's a replicated title you end up with (1), (2), etc appended to the .aspx page.
 
I notice on the raw outputs of the first request it has an absolute url but that has a placeholder page name that gets overwritten by the draft save. Is there a way to pull the absolute url after using SavePageAsDraft or Publish?
 
Attachment of screenshot as required by power platform.
  • t.sheehy Profile Picture
    4 on at
    Getting new page url from "Send an HTTP request to SharePoint" News page creation
    UPDATE: Disregard, I had the new module pointed at the wrong sharepoint site

    -----
    Unfortunately I get this error:
     
    {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.ClientServiceException","message":{"lang":"en-US","value":"Item does not exist. It may have been deleted by another user."}}}
  • Suggested answer
    Expiscornovus Profile Picture
    31,844 Most Valuable Professional on at
    Getting new page url from "Send an HTTP request to SharePoint" News page creation
    It looks like the SavePageAsDraft and Publish methods don't return the Url. You could use a new Get request after the publish action. With a $select query parameter you can specifically retrieve the AbsoluteUrl.
     
    Try something like the below example
     
    URI
    _api/sitepages/pages(@{outputs('Send_an_HTTP_request_to_SharePoint')?['body']['d']['Id']})?$select=AbsoluteUrl
     
    Headers
    {
      "Accept": "application/json;odata=nometadata",
      "Content-Type": "application/json;odata=nometadata"
    }
     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492