Button/link to create news post based on template

New Contributor

I have created a website template stored in the folder templates in library website pages in order create news based on this template.


Via New > page I can select the template manually.

In order to have an easy handling for users I want to create a button or link (e.g. in Teams) to create a new news post based on this dedicated template directly. How can I achieve that?


Best regards




7 Replies


Thank you for your reply. The bot is a solution for the button, but I still struggle creating a SharePoint page based on a template.


My post was a bit misleading, I believe. I did not create website templates but templates for web pages stored in library website pages.

How can I create a webpage with a dedicated template without user's intervention/choice in between?


Thank you and best regards


@Stefan Gille you can create if you are using Publishing page and also you can set PageLayout


Are you using Modern pages then we have to use PnP I guess?

Yes, indeed I am using modern pages.

@Stefan Gille sorry cannot tell exactly how to do but modern pages can be created programatically and a page layout can be decided, a very detailed explanation on what can be done or not

Best Response confirmed by Stefan Gille (New Contributor)


This guidance from Daniel Estelius helped me a lot to create a SharePoint webpage via Flow based on a template.


For the trigger I decided to use a Microsoft Form embedded in Teams. This also allows to ask you user for some specific information for the creation of the page.

But I will check the creation of a bot for future usage as well.

Thank you for your support.


Best regards


@Stefan Gille Glad that you could solve the problem