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 / Updating Document Libr...
Power Automate
Unanswered

Updating Document Library Title HTTP Request

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I am trying to update a Document Library name/title via the HTTP Request following the Working with lists and list items with REST | Microsoft Docs 

 

 

POST https://{site_url}/_api/web/lists(guid'{list_guid}')
Authorization: "Bearer " + accessToken
Accept: "application/json;odata=verbose"
Content-Type: "application/json"
Content-Length: {length of request body as integer}
If-Match: "{etag or *}"
X-HTTP-Method: "MERGE"
X-RequestDigest: "{form_digest_value}"

{
 "__metadata": {
 "type": "SP.List"
 },
 "Title": "New title"
}

 

 

I have done this in flow as below; 

Marty_88_0-1652790625060.png

 

But get this error below;

Marty_88_1-1652790166392.png

 

 

When I run the step without the body i see that I am getting an correct response back from SP..

 

Any ideas?

 

Thanks

 

 

Categories:
I have the same question (0)
  • shoog Profile Picture
    2,164 on at

    We can only use the GetByTitle function in a GET action.

    You should split your action into two seperate actions:

    The first to get the item ID you want to modify using the GetByTitle function,

    the second to update the item but with the _api/Web/lists(guid'<guid>') url where <guid> refers to the Id field of the output of the first action.

  • Marty_88 Profile Picture
    4 on at

    Hi @shoog 
    Thanks for this, I have now been able to capture the ID from the first action, but when i have updated the second action I also still have an error;

     

    Marty_88_0-1652963021335.png

    Error

    Marty_88_1-1652963099317.png

     

    Thanks for your time

     

  • shoog Profile Picture
    2,164 on at

    You could modify the body of your request to something like this (please not the single quotes in stead of double), type should be SP.List

    {
     '__metadata': {
     'type':'SP.List'
     },
     'Title':'<your title here>'
    }

     

  • Marty_88 Profile Picture
    4 on at

    Hi @shoog 

    Marty_88_0-1653038408087.png

     

    even with single quotes it has the same error...

  • shoog Profile Picture
    2,164 on at

    Sorry for the late reply.

    Please revert to the Content-Type header to verbose like in your original screenshot, right now it defaults to basic odata, which doesn't include the metadata tag.

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard