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 :
Power Automate - Building Flows
Answered

The Expression is Invalid - POST Method for creating a site page

(0) ShareShare
ReportReport
Posted on by

I'm attempting to build a flow that creates site page when a list item is created.

I'm following a tutorial however when I try to use the following expression in the Uri box under 'Send an HTTP request to SharePoint' it tells me the expression is invalid, even though it works for the guy in the tutorial.

 

_api/web/getfilebyserverrelativeurl('/sites/SPFx/SitePages/OpportunityTemplate.aspx')/copyto('/sites/SPFx/SitePages/@{triggerbody()?['Title']}.aspx')

 

Create SharePoint Site Pages automatically with Power Automate - YouTube

9:00 minutes

 

Can anyone see what i'm doing wrong?

 

LukeSykes_0-1654082472980.png

 

I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    32,908 Most Valuable Professional on at
    Re: The Expression is Invalid - POST Method for creating a site page

    Hi @LukeSykes,

     

    Did you copy/paste the value into the expression editor?

     

    If so, can you try directly copy pasting your value into the Uri field instead? Because of the at-sign and curly brackets in front of the title reference it should be aware that this part is an actual expression/dynamic content field.

     

    CopyPaste_PA.gif

     

     

  • LukeSykes Profile Picture
    on at
    Re: The Expression is Invalid - POST Method for creating a site page

    Hi There

     

    I did exactly that when it didnt work in the expression box, then followed the rest of the tutorial, the error I now get is this

     

    Server relative urls must start with SPWeb.ServerRelativeUrl
    clientRequestId: 78c2cc34-23a6-49a4-8ce8-0df9b4ce4926
    serviceRequestId: 401543a0-f053-4000-46d1-e46df259e539

     

    but I cant see where to input that

     

    LukeSykes_1-1654090210014.png

     

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard