Update Library name and add library to menu using Power Automate
-
20-02-2021 - |
Question
I have here 2 questions :
I created a document library with a specific name using the HTTP request action and would like to give this document library a friendlier name. If i use the same HTTP Request action, it creates an additional library with the new name> Any idea how i can simply update an existing library name ?
Does anyone know how to add a newly created library automatically into the left handed menu of the site ? When i create it with the HTTP Request, it goes into the site content but does not show up in the site menu...
Thanks a lot for your help ! (sorry but my "hello all" is not showing up..)
Solution
Here is your complete answer to your 2 questions asked above
- You want to createt a SP Library using an HTTP request right? if so you can easily do that using Power Automate and "Send an HTTP request to SharePoint" action like this :
- For showing your SP Library to Navigation, you need to add :"OnQuickLaunch": true to your JSON body as follow :
here is the JSON code :
{
"__metadata": {
"type": "SP.List"
},
"BaseTemplate": 101,
"Description": "",
"Title": "LIB23",
"ListExperienceOptions":1,
"OnQuickLaunch": true
}
- Now you want to update your existing library "Title" to a new Title, you need to do some changes on your HTTP request as follow :
as you can see :
- The first change i made, i add ../getbytitle("old library title") in order to access the endpoint of that specified library,
- second, you need to add "X-HTTP-Method : MERGE" and "***IF-MATCH : ****" headers
- and then update your JSON code with your new required title, easy heh ?
Please, let me know if this worked for you, it's working for me pretty fine !
OTHER TIPS