SOLVED

PnP: Provisioning a site and trigger a Flow or Function

Iron Contributor

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://mytrigger.azurewebsites.net/api/HttpTrigger1?code=thecode" 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

1 Reply
best response confirmed by Bernd Verhofstadt (Iron Contributor)
Solution

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 best response

Accepted Solutions
best response confirmed by Bernd Verhofstadt (Iron Contributor)
Solution

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.

View solution in original post