PnP: Add ListTemplates during provisioning in modern SP sites

%3CLINGO-SUB%20id%3D%22lingo-sub-741157%22%20slang%3D%22en-US%22%3EPnP%3A%20Add%20ListTemplates%20during%20provisioning%20in%20modern%20SP%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-741157%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20folks%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20digging%20for%20some%20time%20now%20but%20I%20don't%20get%20it.%20I%20want%20to%20provision%20modern%20SPO%20sites%20with%20Site%20Designs%2FSite%20Scripts.%20To%20add%20the%20option%20for%20end%20users%20to%20instantiate%20lists%20and%20libraries%20that%20include%20globally%20provided%20content%20types%20and%20fields%2C%20I%20want%20to%20include%20list%20template%20as%20we%20did%20this%20ten%20years%20ago%20with%20that%20clunky%20old%20feature%20framework.%20%3A)%3C%2Fimg%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20now%20I%20want%20to%20trigger%20a%20flow%20as%20part%20of%20the%20site%20script%2C%20allowing%20me%20to%20use%20PnP%20to%26nbsp%3B%20provision%20these%20list%20templates%2C%20but%20I%20can't%20find%20a%20solution%20here.%20Can%20anyone%20guide%20me%20to%20a%20good%20supported%20and%20future-proof%20way%20to%20archive%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-741336%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%3A%20Add%20ListTemplates%20during%20provisioning%20in%20modern%20SP%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-741336%22%20slang%3D%22en-US%22%3EHi%20Carsten%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20is%20a%20documented%20scenario%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fsite-design-pnp-provisioning%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fsite-design-pnp-provisioning%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20this%20helps%3CBR%20%2F%3EJoel%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-741344%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%3A%20Add%20ListTemplates%20during%20provisioning%20in%20modern%20SP%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-741344%22%20slang%3D%22en-US%22%3EHey%20Joel%2C%3CBR%20%2F%3E%3CBR%20%2F%3Ethanks%20for%20answering.%20I%20am%20completely%20aware%20of%20this%20article%20and%20the%20pattern%20described%20here.%20That%20was%20unfortunately%20not%20my%20question.%3CBR%20%2F%3E%3CBR%20%2F%3EMy%20question%20is%20how%20to%20upload%20a%20list%20template%20into%20the%20list%20template%20gallery%20resp.%20how%20to%20define%20a%20list%20template%20with%20PnP%20for%20provisioning.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-741525%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%3A%20Add%20ListTemplates%20during%20provisioning%20in%20modern%20SP%20sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-741525%22%20slang%3D%22en-US%22%3EHi%20Carsten%2C%3CBR%20%2F%3EMy%20bad%2C%20didn't%20got%20your%20question.%3CBR%20%2F%3EPnP%20list%20templates%20are%20part%20of%20a%20site%20template%20that%20can%20have%20only%20the%20list%2C%20for%20example.%20The%20problem%20you%20have%20here%20is%20that%20there%20is%20no%20option%20to%20make%20list%20templates%20from%20PnP%20to%20appear%20on%20the%20default%20UI%20to%20create%20lists.%20You%20will%20have%20to%20create%20a%20custom%20UI%20for%20that.%3CBR%20%2F%3EBut%20this%20is%20definitely%20a%20common%20scenario%20as%20I%20have%20had%20to%20do%20this%20to%20more%20than%20one%20client%20and%20would%20be%20great%20to%20have%20a%20place%20where%20templates%20could%20be%20dropped%20to%20automatically%20be%20displayed%20on%20the%20UI.%3CBR%20%2F%3E%3CBR%20%2F%3EA%20minimalistic%20approach%20would%20be%20to%20have%20a%20simple%20list%20as%20the%20entry%20point%20to%20trigger%20the%20provisioning%20process.%20Or%20add%20a%20custom%20SPFx%20web%20part%20on%20top%20of%20the%20list%20to%20give%20a%20better%20UI%20to%20end%20users.%20You%20can%20then%20use%20Flow%20%2B%20Azure%20queue%20%2B%20Function%20to%20create%20a%20robust%20process%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi folks,

 

I am digging for some time now but I don't get it. I want to provision modern SPO sites with Site Designs/Site Scripts. To add the option for end users to instantiate lists and libraries that include globally provided content types and fields, I want to include list template as we did this ten years ago with that clunky old feature framework. :) 

 

For now I want to trigger a flow as part of the site script, allowing me to use PnP to  provision these list templates, but I can't find a solution here. Can anyone guide me to a good supported and future-proof way to archive this?

3 Replies
Highlighted
Highlighted
Hey Joel,

thanks for answering. I am completely aware of this article and the pattern described here. That was unfortunately not my question.

My question is how to upload a list template into the list template gallery resp. how to define a list template with PnP for provisioning.
Highlighted
Hi Carsten,
My bad, didn't got your question.
PnP list templates are part of a site template that can have only the list, for example. The problem you have here is that there is no option to make list templates from PnP to appear on the default UI to create lists. You will have to create a custom UI for that.
But this is definitely a common scenario as I have had to do this to more than one client and would be great to have a place where templates could be dropped to automatically be displayed on the UI.

A minimalistic approach would be to have a simple list as the entry point to trigger the provisioning process. Or add a custom SPFx web part on top of the list to give a better UI to end users. You can then use Flow + Azure queue + Function to create a robust process