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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error: The parameter _...
Power Automate
Unanswered

Error: The parameter __metadata does not exist in method GetById

(0) ShareShare
ReportReport
Posted on by 41

Hi Community,

 

I am trying to rename a SharePoint file in a Power Automate flow using 'Send an HTTP request'. I have done this before in another flow without issue. I can't get it to work in this new flow / document library.

 

Can anyone see the problem?

 

The error I'm getting is:

 

lorinda_abey_0-1711620128414.png

 

Below are the parameters I've put into the 'Send an HTTP request':

 

lorinda_abey_1-1711620218002.png

 

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

    Hi @lorinda_abey,


    Might be a typo in your URI?

     

    Can you try and change your URI from _api/lists to _api/web/lists?

  • lorinda_abey Profile Picture
    41 on at

    Unfortunately this doesn't fix the issue. Same error message pops up.

     

    I am pretty confident about the Uri as I've done a check in the web browser to ensure it's valid.

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

    Hi @lorinda_abey,

     

    I always use the _api/web/lists URI. I have never used _api/lists endpoint, so not sure if that would actually work.

     

    Also the the Microsoft documentation uses the _api/web/lists in their examples, below is the update list item code snippet:

    https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest#update-list-item

     

    Btw, I also notice you are using PATCH in your X-HTTP-Method Key in the Headers section. Can you change that to MERGE?

     

    And lastly, have you double checked that you are using the correct ListItemEntityTypeFullName property value in your type property?

     

     

  • lorinda_abey Profile Picture
    41 on at

    Changing to MERGE does not work either. Same error message.

     

    And yes I'm confident of the ListItemEntityTypeFullName property value. I copy and paste this and the Uri from the browser to ensure there are no typos or mistakes. See below:

     

    lorinda_abey_0-1711628051449.png

     

    Also I've used both the PATCH method, and the Uri without 'web' in another flow and it works perfectly!

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @lorinda_abey,

     

    Strange that it does not work.

     

    If it helps, here is my setup I used while testing this.

     

    URI

    _api/web/lists/getbytitle('AdminTraining')/items(@{triggerOutputs()?['body/ID']})

     

    Headers

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose",
     "If-Match": "*",
     "X-HTTP-Method": "MERGE"
    }

     

    Body

    {
     "__metadata": {
     "type": "SP.Data.AdminTrainingItem"
     },
     "FileLeafRef": "PowerAutomateRename.docx"
    }

     

    admintraining_example.png

     

    The flow ran successfully without an error.

     

    admintraining_result.png

     

    The doc which I uploaded (Test.docx) is renamed to PowerAutomateRename.docx

     

    powerautomaterenametest.png

  • lorinda_abey Profile Picture
    41 on at

    Today I tried your exact code and it worked.

     

    I then reverted back to my original code (step by step testing each change) and it worked too.

     

    Very frustrating. I am no closer to understanding what went wrong but at least it seems to be working today.

     

    Thank you for your help.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard