Office 365 PnP Workflow Provisioning

Brass Contributor

Hi all,

 

Can anyone tell me which steps I should follow to privision a Reusable SharePoint workflow created with SharePoint Designer? 

Extracting a PnP template with -Handlers Workflows seems to be the first step, but I'm not sure what my VSO project needs to have in order to provision a workflow. 

 

Many thanks,
Rémy Bosman

11 Replies

@Rémy Bosman,

The easiest way to figure out how to do this is by using the PowerShell commands

 

Get-SPOProvisioningtemplate and Apply-SPOProvisioningtemplate

 

You could run this with or without the Handlers/ExcludeHandlers options. If you just do the workflows you risk not including the columns/content types/lists etc that may be required by the workflow.

 

If you want tot do this via code then simply replicate the same code as is used within the code used by the above PowerShell commands 

Hi Remy,

 

I am having a simular issue with Csom C#.

 

Adding @Vesa Juvonen 

 

Do you have a way how to upload new wf's with pnp?

@Deleted, what do you mean by new workflows? Workflows that are not exported from an existing site?

Hi Pieter,

 

i mean workflows that do not exist yet in a tenant but which you want to upload to a new tenant.

do you need to upload the WSP? or is there a new way how to do this? bypassing a wsp?

 

i see when i get a export the whole workflow is exported.

 

Kr,


Paul

@Deleted, yes SPD workflows are exported and imported using PnP Templates. No need for WSPs.

Hi Pieter,

 

so this means you will need to use the exported xml in your pnp file?

 

kr,

 

Paul

@Deleted,

Yes, simply do Apply-SPOProvisioningtemplate ( or the c# equivalent) to apply the template and the workflow inside the tmeplate will be provisioned

Thanks for your help Pieter! 

Hi.
When you say Workflow, which type of workflow?
Workflow SP2010 (created with spd)
And if yes, list or reusable?
Workflow SP2013 (created with spd)

Thanks!
I only tried list workflows using sp2013 on office 365. But others should work too.
So, you tried with Workflow of type 2013.. I've tried with wf2010 with no success, maybe I do something wrong, or not work with them..
Thank you