I want to create a site template (lets say leave management system) with newly introduced "Site Design". With site design we can create lists, libraries with some set of columns, installing add-in etc. But I cannot create pages and I cannot push the web part to pages.

With SPFx we cannot create pages, we cannot add web parts to the pages (remaining things can be done).

Question is:

How to deploy lists, libraries, pages, web parts in a single package using modern capabilities in SharePoint like site design, SPFx, MS Flow or any other etc.

Is there a way to achieve in Provider Hosted apps(creating lists, creating pages, installing SPFx, pushing modern web parts to pages)?

2 Answers 2


PNP recently added capabilities for working with modern pages to their core javascript library and their powershell commands. For example, the Add-PnPClientSideWebPart powershell command allows you to add a web part to a modern page.

So, all you'd have to do is create an azure function that uses the pnp powershell to add the desired web parts, and call the azure function from a flow that was configure to run as part of the site design. Here's a blog post that walks through it, with an additional piece of an azure storage queue.

As a side note, hopefully microsoft improves this situation, as this is a ridiculous amount of work to add web parts to page, especially considering that this reproduces functionality available via clicking on "save site as template"


You can use PnP templates in Microsoft Flow to provision SharePoint entities.

This article describes how to provision sites, lists, libraries, and Modern pages using PnP templates from Microsoft Flow.

Note, this is provided as an action in the Plumsail SP connector, which is a part of Plumsail Actions product. It is a paid product.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.