Forum Discussion
PnP: Provisioning a site and trigger a Flow or Function
Hi,
I'm using PnP Provisioning engine to create new sites/groups. I want to start a flow or function after or during the provisioning. I've tried using the SiteWebHooks:
<pnp:SiteWebhooks>
<pnp:Webhook ServerNotificationUrl="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftesthttptrigger-imec.azurewebsites.net%2Fapi%2FHttpTrigger1%3Fcode%3Dthecode&data=02%7C01%7CBernd.Verhofstadt%40imec.be%7C306b0cac3c4c4a59452708d7119dc32a%7Ca72d5a7225ee40f09bd1067cb5b770d4%7C0%7C0%7C636997242165003036&sdata=NaGkqZ7s0mL9sbPklSRgaon%2BRAx4pPF8bgHCqjHEVyA%3D&reserved=0" ExpiresInDays="31" SiteWebhookType="WebCreated" />
</pnp:SiteWebhooks>
It seems that this webhook was created to so some tasks for the pnp schema:
https://twitter.com/vrdmn/status/889862682341511168?s=20
I see some other workarounds:
1. Create a custom SPFx app to start a flow or function
2. Create a site from a site design
Does anyone have an idea to start flow from PnP Provisioning Engine?
Best regards,
Bernd
Hey Bernd Verhofstadt ,
I ran into a similar problem recently. Basically, we have a governance system to record any team created. And I needed to know whether the provision was ready or not. My solution was to have a "Governance" List, where each item is a site created. the list also has a column "isReady" that I update to "yes" when my powershell script is done provisioning. So that's an option for you. Basically, you have a list to keep tracking of provisioning, have your script set(or create) an item in this list, and create a Flow to check, when an item is updated(or created) if it is ready, aka finished provisioning.
Let me know if you need any help.
1 Reply
- Carlos_MarinsIron Contributor
Hey Bernd Verhofstadt ,
I ran into a similar problem recently. Basically, we have a governance system to record any team created. And I needed to know whether the provision was ready or not. My solution was to have a "Governance" List, where each item is a site created. the list also has a column "isReady" that I update to "yes" when my powershell script is done provisioning. So that's an option for you. Basically, you have a list to keep tracking of provisioning, have your script set(or create) an item in this list, and create a Flow to check, when an item is updated(or created) if it is ready, aka finished provisioning.
Let me know if you need any help.