Please Help - Custom Workflow (SP Designer 2013) - Not Working

Highlighted
Occasional Contributor

I am really hoping someone can help me, I followed the instructions on the site below to create a custom workflow that creates a subsite whenever an item is added to a specified list.

 

https://www.dmcinfo.com/latest-thinking/blog/id/8661/create-site-from-template-using-sharepoint-2013...

 

The workflow works GREAT but WILL NOT create the sub site with the custom template. The guy in the article above does not touch on this very much but from what I've gathered you need the site template GUID. I've tried EVERY possible way to generate this site with the template ID and it isn't working, the site is still created but it's your basic teams site. 

 

Side Note - I'm able to create a subsite with the custom template with no issues if it's done manually. 

 

Please help if you can :( 

 

Thank you!

Ashley

 

9 Replies
Highlighted

Please provide more details!

In the workflow, what is the definition of the variable SiteTemplate and what is the value you are setting it to? Screenshots appreciated :)

Kind regards, John

Highlighted

I've attached a zip file containing both the Custom Project Site .wsp and the Workflow .wsp file, will that help? 

Highlighted
Sorry, I am not going to import those into any environment. Please provide the screenshots instead :) Kind regards, John
Highlighted

Hi John,

 

Screenshots are attached, please let me know if you need any others.

 

The SiteTemplate variable is setup as a String with the GUID as the Value. This is what my GUID looks like: 

{C7FEA85D-0E0B-4B65-A0AB-1C079D37D707}#PMOTemplate

 

I followed the instructions provided in the article I referenced in my original post. I don't know what I'm doing wrong because everything works perfectly and a site is created, but it isn't created with the template. The article doesn't touch on using a custom template and I'm guessing I'm doing something wrong but am just starting to use SharePoint so I'm not as savy as I'd like to be.

 

I appreciate your help so far, John!

 

Ashley

 

 

 

 

Highlighted

Hi Ashley,

 

I created a workflow similar to yours. I'm using a variable to set the guid of the site template (to make it easier to manage updates) but I believe you need to set it as {C7FEA85D-0E0B-4B65-A0AB-1C079D37D707} rather than {C7FEA85D-0E0B-4B65-A0AB-1C079D37D707}#PMOTemplate.

 

-Karine

Highlighted

Are you able to show how you created the variable using the GUID?

 

Thank you so much!

Highlighted

Hi again,

I just use a local variable (string) set at the beginning of the workflow:

Set local variableSet local variableLocal variables listLocal variables list

I then use this local variable to set the WebTemplate value in the Parameters dictionary, similar to what is described in the DMC info article you linked to:

 

Parameters dictionaryParameters dictionaryWeb template valueWeb template value

The Guid needs to be entered with the curly brackets but without the hashtag and everything that follows. From your screenshots, it seems you are already using a local variable to set the site template GUID, so you should be able to just edit the value in the string builder to remove '#PMOTemplate'.

 

I can confirm my workflow does use the custom template matching the guid provided when creating the site (tested with different versions of the same template) in SharePoint Online.

 

Hope that helps!

-Karine

Highlighted

Hi Karine,

 

Thank you for the information, I have it setup that way and now the site doesn't create a subsite at all.

 

I'm wondering if it has anything to do with how the site template was added to SharePoint.

 

I created the subsite template on a separate site and saved it as a template and then uploaded it to the Solutions on my parent site with the workflow. Could that be the cause of my problem? Is there a specific way I need to add the custom template to my new site so it works properly?

 

Thank you!!

 

Ashley

Highlighted

You said you are able to use the template when creating sites manually? Did you get the GUID from the site where the template is used?

Are both the site you used to create the template and the site you are using the template in located in the same site collection?