Yah, for what should really be an out of the box feature - Microsoft have absolutely left SharePoint Administrators high and dry with Site Template and View Template creation.
I totally agree. I have been using the "save site as template" for years in older versions of SharePoint now that feature is basically gone. Totally ridiculous. Microsoft being Microsoft. I hate Microsoft. It makes me sad that I make my living using their software.
Finally someone who made a guide about this! Just one question: In the "Update Home Page" step in Power Automate, where does the code in the Body generates from? Keep up the good work! :)
This video got me going in the right direction, however I’m struggling to figure out how to create a site template which sets up just the layout of the home page. I saw your site script does this and I’m wondering how you accomplished it or created the JSON for that layout. I saw at 1:25 you had a template which triggers a “record site creation event”. Does this accomplish this or does such a thing exist? Thanks for any additional help you can provide!
Hi Brandon, what really create the page with the layout and the structure is the Power Automate flow, you can import my sample that you can find here: github.com/giuleon/CustomSiteTemplates
Very good video! I just have a question. How to create a custom template site, with a different design from the standard Communication Site and Team Site. For example, how to best design a Communication (Custom Template) site that has a right side section, similar to the Human Resources template? It's possible? Or every time we create a custom template with WebTemplate = "68", SharePoint, for example, generates a Communication Site with that huge Hero web part?
Heyy Giuliano I wanted to know how you got the JSON Script of the customised site Can we get the same with the following command : Get-PnPSiteScriptFromWeb -Url -IncludeAll If not then how can I get it cause I do not have the permissions for the Sharepoint APIs so creating the power automate flow is not an option
Hi, You can try, important is that you get the JSON structure that you see in content in the link below: learn.microsoft.com/en-us/powershell/module/sharepoint-online/get-spositescript?view=sharepoint-ps
Hi, Thanks for your question. You must run the opposite PowerShell commands Remove-SPOSiteDesign, Remove-SPOSiteScript learn.microsoft.com/en-us/powershell/module/sharepoint-online/remove-spositedesign?view=sharepoint-ps
Hi Giuliano, What if I want to create a List from a "Template from your oganization" option? How can I do that? How can I add the List template to be selected from that screen?
Hello Giuliano. After seeing your video I am stuck on a question, and so I apologize about: If i have already a standard sharepoint site to be used as the default site template, how I can get/extract the script of customization, to upload to Org wide? Hope my question makes sense. Thank you and great video as always
Hi Sergio thank you for watching. Once you created with PowerShell the site template then you can use a Logic App that runs when a user select the site template and create all pages needed
Who connection does the powerautomaet flow run under? Since "When a HTTP request is received" is a premium trigger, wouldnt everyone in the tenant need a premium license?
Hi, does is possibile to automate the process to apply a custom template to a new site? I would like to automatically create a new sub site and auto apply the custom template. Thanks
Hi Pietro, Thank you for your question, I suggest you to use a modern approach working with communication sites connected to an Hub Site. Classic sun sites is the old way to have sites connected to the parent, in any case going to your question yes this approach works in your scenario.
Hi! the solution worked, however, I can't do webpart optimizations (create a template with several webparts), like with Microsoft templates... is it possible?
@@DeLucaGiulian Hello! In this case, do I create my entire website (with webparts) and use it as a template? Generating script? Do you have a video demonstrating how to do it? Thanks!
Hi Kumar, Thanks for watching, check out here what you can do docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema
Hi Giuliano, Thanks for an amazing video on custom site templates, I have a query here, how does the Power Automate Workflow know the Site URL (Web URL) of the site for which I am applying the template. I see from your Github code, you are just passing 2 parameters to the flow while invoking it (event, product), where do the rest of the inputs of that flow come from? (webUrl, webDescription, creatorName, Email, TimeUTC)? Could you please explain on a comment? Thanks in advance.
Hi, Thanks for watching. If you want to get the URL of the SharePoint site that is invoking your Logic App you need to use webUrl which comes directly from the SharePoint call along with webDescription, creatorName, Email, TimeUTC. Hope this help.
Hi @@DeLucaGiulian, Thank you for your response. I have not used logic apps, I have configured the WF as when an HTTP request is received trigger as shown in your video. In that case, how do I pass the web URL and other details from the JSON script which triggers the flow?
Hi, Thanks for the video. It is really awesome and complete guide to create Site Template. I just have a question. Is that possible to create the Site template completely using JSON?
@@DeLucaGiulian That's great! I am trying to create a Custom site template using JSON alone. I have to add few web parts as a part of template like Quick link, Hero, People, Recent documents etc.. Do we have JSON for Web parts also. Could you please help me..
Great stuff. What was the fix you applied to the url? I can't get Add-SPOSiteScript to work. Error says triggeflow is invalid...url has invalid value. I noticed you truncated the url. How did you find the correct value?
Hi, Thanks Patrick, please check if the verb is correct "triggerFlow" and you can copy the right URL going in the Logic App or Power Automate flow this one must be an http trigger, when you open it in the first block you can copy the URL and paste it in you PowerShell command Add-SPOSiteScript
I have created a department site and already associated it with the hub, do I need to disconnect them before following this video and do this process twice with each site separately to create two templates (one for departments and another for the home page).
Thanks for watching and for your feedback, in order to read the field CanvasContent1 you can use in Power Automate the action "Send an HTTP request to SharePoint" add the site that you want to target and include in the URI something like this: _api/sitepages/pages/GetByUrl('SitePages/Home.aspx') The result will give you the content of the field CanvasContent1. Normally I edit the page manually and when I'm ready, I run the flow in Power Automate to check the content of CanvasContent1.
@@DeLucaGiulian This is super helpful, thank you! I'm curious how you go about "escaping" the json in CanvasContent1 so that it has all of the \ characters.
Is it possible to make changes to the custom site in share point, that are then saved in the custom site? So then I can use the modified version as a custom template in the next project?
Hi, Yes you can avoid power automate if you want but it is more limited, check this link out learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
As I said without Power Automate is limited, these are the things that you can do: Creating a new list or library (or modifying the default one created with the site) Creating site columns, content types, and configuring other list settings Set site branding properties like navigation layout, header layout and header background Applying a theme** Setting a site logo Adding links to quick launch or hub navigation** Triggering a Power Automate flow Installing a deployed solution from the app catalog Setting regional settings for the site** Adding principals (users and groups) to SharePoint roles** Setting external sharing capability for the site**
Hi. Is it possible to create a template from a communication site on one tenant and apply it as a communication / home site on another tenant? For instance, I might want to create a set Home site on one tenant and replicate that on multiple tenants for multiple viva connection deployments?
Hi, Thanks for watching. First of all, you have to place all web parts that you want to provision on every site. In the video I showed using Power Automate how to get a property named "CanvasContent1", this property contains everything you see on the page. It's just a matter of creating new pages adding the property CanvasContent1.
@@DeLucaGiulian Thanks for the reply. Would it be possible to dynamically fill in data to web parts such as "People" and add the user who requested the new site? Or add group calendar and pair it with the newly created Team?
@@DeLucaGiulian Got everything working perfectly. Question, I looked at the MS documentation, couldn't find a way to add a choice column though. Any thoughts? Perhaps I should do it using HTTP request in a different Action?
That's great! Choice fields are not supported with site tamplates as you mentioned you should use the SharePoint rest api to achieve this goal. There are many samples online, you can check this one: www.alanps1.io/power-platform/flow/flow-create-sharepoint-list-choice-fields-using-rest-api-with-power-automate/
answers to the following questions 1.)Can multiple document libraries be included in a site template 2.)Can multiple site pages be included in a site template 3.)Can custom folder structures in a documents library be incorporated into a site template 4.)Can custom permissions settings be incorporated as part of a site template 5.)Can custom site templates be applied to Team sites (SharePoint sites connected to Microsoft Teams)
Hi, 1- yes 2- yes 3-4- your custom site template can call your Power Automate flow that will run in order to add the folders that you want, you can use this approach to add pages, lists, doc libraries and even change permission 5- Yes this is also possible
This video is SO NOT helpful at all. All you did was show us a pre-made script and how to set it up and run it. What if we want to create a template from scratch? Is there a web builder with a GUI, or do you code it all out manually? That's what I wanted to know.
Hi Freddie, Thanks for watching there is no GUI that help you to build your custom template, however you can follow this documentation to understand how to build your JSON: learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview This link is also in the description of my video