Forum Discussion
Template SharePoint Library?
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?
- lsittlerBrass Contributor
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 🙂
- ObiquitechAdminCopper Contributor
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 Communityis 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 PowerShellCreating a new Document Library using Power Automate - YouTube
- Andrew BrewsterCopper Contributor
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-46bd-4346-9998-330c32733c25
This seems like a pretty comprehensive guideThe Ultimate Guide to SharePoint Site Templates and Site Scripts (laurakokkarinen.com)