Template SharePoint Library?

Brass Contributor

Is it possible to create a template document library? Which when a new SharePoint site (or MS Teams) is created it uses that template document library? 

 

E.g., the template document library has defined views and columns, e.g., status (draft, published, archived, obsolete).

 

If so is there any documentation on how to implement this?

3 Replies

Its the sort of thing that you could define in a site script that gets run whenever as new site is created.
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
Site owners can also define a template, depending on their permissions (probably need to be site collection admins)
https://support.microsoft.com/en-us/office/set-a-custom-template-for-a-sharepoint-library-8e0177eb-4...
This seems like a pretty comprehensive guide

The Ultimate Guide to SharePoint Site Templates and Site Scripts (laurakokkarinen.com)

Hi @WYellow,

 

Here, it seems the same subject as yours with a Microsoft answer: How can I create a Document Library Template in SharePoint - Microsoft Community

 

The conclusion is: currently, no easy way - to create a Template by script or automation.
- PnP PowerShell: extract existing library as Template (XML) and import it to another site

- Microsoft 356 CLI: script the configuration of your library

- Power Automate / Logic App: you can use REST API to create or use an existing library and apply all settings

 

Hoping this information will help you :)

@lsittler Good conclusion, I found it helpful to pour through those resources in the effort to do the same thing as OP. I think your previous link to 


How can I create a Document Library Template in SharePoint - Microsoft Community

is not relevant to this thread as there is one response from a Microsoft Agent and they essentially answer a different question, which is "How do I create a document template to upload to my library?" as opposed to the question here which relates to creating an entire document library template.

 

I have not finished my attempt at making my own document library template so will update answer if/when I find the solution and steps, but for now, here are some useful links I've gathered:
Copying columns from one list to another using PowerShell 

Creating a new Document Library using Power Automate - YouTube 

Ultimate Guide to SharePoint site templates and scripts