Question

I have here 2 questions :

  1. 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 ?

  2. 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..)

Was it helpful?

Solution

Here is your complete answer to your 2 questions asked above

  1. 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 : enter image description here
  2. For showing your SP Library to Navigation, you need to add :"OnQuickLaunch": true to your JSON body as follow :

enter image description here

here is the JSON code :

{
"__metadata": {
"type": "SP.List"
    },
"BaseTemplate": 101,
"Description": "",
"Title": "LIB23",
"ListExperienceOptions":1,
"OnQuickLaunch": true
  }
  1. 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 :

enter image description here

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

For updating the library title, please use the body below: It is an update request.

{
  "__metadata": {
    "type": "SP.List"
  },
  "Title": "NewLibraryName"
}

For creating libraries showed in left navigation, you will need to add the property

"OnQuickLaunch": true

My test works like this:

enter image description here

thanks a lot for your answer.

For the title update, it's the same thing as creating a new library. when i try this, it creates a new one with the new name... my URI is the same , method POST and body identical.

am I missing something ?

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top