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 / 'Get file metadata' fa...
Power Automate
Unanswered

'Get file metadata' failed — Route did not match

(0) ShareShare
ReportReport
Posted on by 49

I'm trying to automatically create a SharePoint page when a SharePoint item is created. I found a YouTube tutorial on the process but I'm getting an unexpected error. The error occurs on the 'Get file metadata' step (first screenshot). I'm new to all of this so any help is greatly appreciated!

 

Here is the error:

 

 

Route did not match
clientRequestId: d9d3f6f0-d20c-4579-b848-097c05de492f
serviceRequestId: d9d3f6f0-d20c-4579-b848-097c05de492f

 

 

 

Here is my flow:

Collinjay_0-1665158234800.png

Collinjay_1-1665158258143.png

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

    Hi @Collinjay,

     

    If you title has any space characters or any other type of characters the file name will be different when it is created. For the Identifier of the Get file metadata you need to encode that and replace the space characters by hyphens.

     

    Try an expression like below:

     

     

    encodeUriComponent(concat('/SitePages/',replace(triggerOutputs()?['body/Title'], ' ', '-'),'.aspx'))

     

     

  • Collinjay Profile Picture
    49 on at

    Hi @Expiscornovus ,

     

    Thank you for helping me out. Unfortunately the expression you provided did not work. Since I'm new to all of this, I wasn't sure if the parts right after body/Title were necessary, or just an example so I tried both

    encodeUriComponent(concat('/SitePages/',replace(triggerOutputs()?['body/Title'], ' ', '-'),'.aspx'))

    and

    encodeUriComponent(concat('/SitePages/',replace(triggerOutputs()?['body/Title']),'.aspx'))

    but I got the same error message as before.

     

     

    I also tried replacing 'Get file metadata' with 'Get file metadata using path'. That seemed to work but I got an error on my last step. The error message is "Bad gateway." Is that something you can help with here? Or should I create a new post?

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

    Hi @Collinjay,

     

    Can you share a screenshot where you inserted the expression? Can you als share which Title value you used in your test?

  • Collinjay Profile Picture
    49 on at

    Hi @Expiscornovus ,

     

    The Title value I'm using is from 'When an item is created.'

     

    Below is a screenshot of how I used your expression in my flow. Is that how I should do it?

     

    Picture6.jpg

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

    Hi @Collinjay,

     

    I see you have added it as plain text. Can you add the expression via the expression tab?

     

    ExpressionTab.gif

  • Collinjay Profile Picture
    49 on at

    Hi @Expiscornovus ,

     

    After entering your expression the right way (facepalm), I get an error that says "File not found."

    Not sure if a screenshot is a helpful, but here's a screenshot of the error.

    Picture7.png

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

    Hi @Collinjay,

     

    What was the title of the list item which triggered the flow?

     

    listitemtest.PNG

     

    And can you also make a screenshot of the outputs section of the Send an HTTP request to SharePoint action in the flow run history. The action you are using to make a copy of a page?

  • Collinjay Profile Picture
    49 on at

    Hi @Expiscornovus ,

    The name of the list item is the same as the page I'm trying to create. Should they be different in some way?

     

    Below is a screenshot of the outputs. The code wouldn't all fit in the Power Automate window (without having to scroll) so I copied the code to an online editor and took a screenshot of it there. That's why the formatting is different.

     

    Picture8.png

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

    Hi @Collinjay,

     

    A title of a page and a file name (and the file identifier) of a page can be different. Like mentioned earlier, this is because of special characters (Microsoft will change those characters in the filename).

     

    That's why it would help if you can show me the specific title value which you used in your testing. This way I can reproduce the issue and find a fix for you.

     

    Below is an example where I used the '#Testing &*%' as a Title value in my list item which triggers the flow. SharePoint ends up creating it with the -Testing-&--.aspx filename.

     

    Hopefully this clarifies things?

    title_different.png

     

     

  • Collinjay Profile Picture
    49 on at

    Hi @Expiscornovus ,

     

    Thanks for your continued help with this. I truly appreciate it.

     

    Page name example: 105__Monday test 01.aspx

    Page title example: Daily Dose Template

     

    I have a dynamic value in the page name to avoid duplicate page names. The dynamic value I've been using is the Form ID (my overall process for this is MS Forms submission > SharePoint item > SharePoint page). Each page name begins with the Form ID. In the example above, it's the "105." 

     

    The page title for these pages is always "Daily Dose Template." I don't want it to be that, but somewhere along the line, Power Automate uses the page template's title. I would like Power Automate to change the page title so it's the same as the page name (or close to it if there are any special characters).

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard