Create Site Action (SharePoint Designer 2010)

1. Add the “Create a Site” action to a SharePoint 2010 Designer Workflow

image

2. Configure the action

image

URL: The url of the web site. You can either use an relative url to create the site direct under the current site or an absolute url to create the site under any site. The workflow initiator needs appropriate permissions. Or use an impersonation step to run the action under the permissions of the workflow author.

Title: Title of the site

Description: Description of the site

Template: Template name of the new site. Default is Team Site (STS#0).

You can get a list of all farm templates with the PowerShell command “Get-SPWebTemplates”.

To get a list of templates from a specific site’s template catalog use the following PowerShell command:

Get-SPWeb http://contoso/sites/spd | %{$_.GetAvailableWebTemplates($_.Language)}

image

Use the name of the template e.g. WIKI#0

Language Code: The language code for the new site e.g. 1033 for English or 1031 for German. 0 means inherit the language from the parent site.

Inherit Permission: Inherit permissions from the parent site.

Inherit Top Navigation: Use the  same top navigation as the parent site.

Output: Returns the absolute url of the new site

 

image

3. Publish and run the workflow…

Last edited Feb 21, 2011 at 5:39 PM by cglessner, version 3

Comments

steve_barker144 Nov 8, 2013 at 9:02 AM 
I've managed to get it working on our test and developer environments however when putting it on live it at first didn't work, found it said the language isn't supported on this server. Changed it to English US however now the workflow in the log says deleting the Web at URL:
Does anyone have any idea why the workflow and/or SharePoint 2010 delete the site after it creates it?

roastchicken Apr 16, 2013 at 12:13 PM 
Hi
I keep getting 'The language is not supported on the server.' error
Added template and guid as {9918A913-7755-4DE2-8544-9ADD77B530DA}#tomtom
Added url as http://sp20104/projectinit/siteB

PS gives shows as :
LocaleId : 1033
Custom : False
Lcid : 1033
ID : 1
Title : tomtom
Name : {9918A913-7755-4DE2-8544-9ADD77B530DA}#tomtom
IsUnique : False
IsHidden : False
Description :
ImageUrl :
IsCustomTemplate : False
ProvisionAssembly :
ProvisionClass :
ProvisionData :
IsRootWebOnly : False
IsSubWebOnly : False
FilterCategories :
DisplayCategory :
AllowGlobalFeatureAssociations : False
VisibilityFeatureDependencyId : 00000000-0000-0000-0000-000000000000
SupportsMultilingualUI : True

and ULS gives:
Not persisting state for request due to previous errors. Form Template: urn:schemas-microsoft-com:office:infopath:workflowInitAssoc:-AutoGen-2013-04-16T09:36:22:955Z

Is this reliant on INFOPATH services?

Tried all sorts of variations and have used language code as 0 , 1033, 2057(english Uk)

Any ideas anyone?

roastchicken Apr 15, 2013 at 3:50 PM 
Hi
I've created a re-usable workflow in SPD, added a Create Site Action. then on the site I've created a list and added the workflow. Then I run the workflow. The worflow executes as completed but no sub-site is created. I get a comment : The language is not supported on the server.

Should I be creating a Site Workflow? All I want is a button that is able to create the sub site.
Thanks

jonofowler Apr 13, 2013 at 3:54 AM 
Hoping someone can help me. I have installed these workflow actions successfully, however have an issue. My site Locale is set to 'English (Australia)' and when i run the workflow it says it has completed successfully but the site is not created. After looking at the action Error output it says 'The language is not supported on the server'. I have tried using 1033 as the LanguageCode but get the same error. The only way it works is if i change the Locale of the site to 'English (United States)'. Help appreciated.

gregmcallister Apr 4, 2013 at 2:33 PM 
@smonczka - Use variables for the inputs. I don't know why but I have done so frequently in the past because someone told a long time ago that using variables throughout a flow is less intensive than using the current item lookups. Wether they be right or wrong I don't know that either, it is just a habit now. - Greg

smonczka Feb 19, 2013 at 3:46 PM 
I to am hitting a wall on this. I get the same error when attempting to publish...
"(0, 0) Activity 'ID37' validation failed: Path resolved to Referenced activity Property 'ReturnValue' whose PropertyType 'System.Object' does not match with the Target Type 'System.String'.)"
Does anyone have a resolution for this or can point me in the direction of what I am doing wrong. This is a custom template but even if I use the Team Site template i get the same error.

myrkoleitner Aug 1, 2012 at 1:35 AM 
Great job. It worked perfectly on my test environment. Also in the productiveenvironment it worked with the Standard-Templates (STS#1). My custom template doesn't work. If found the correct name with the powershell and i tried also to create a site from PS with this name. This worked. But everytime i put the name in workflow, this error appear: Error is: File or arguments not valid for site template '{78DA3145-E162-4874-B6FC-29F1086EAEDF}#ProjectRoomv2'.
Parameter name: WebTemplate
Can you help me?

shirsath44 Jul 31, 2012 at 10:48 AM 
Hi all,
If you have custom template and want to create site using I love SP,
specify template as {guid}#siteTemplatename

you need to get the guid of the template from using the following powershell script,
Get-SPWeb http://sps2010:007/Codeplex | %{$_.GetAvailableWebTemplates($_.Language)} | fl *

Custom template will appear at the end of the result...

If you properly check this GUID it is different than that which you see in solution gallery..

shirsath44 Jul 31, 2012 at 10:45 AM 
Hi all,
If you have custom template and want to create site using I love SP,
specify template as {guid}#siteTemplatename

you need to get the guid of the template from using the following powershell script,
Get-SPWeb http://sps2010:007/Codeplex | %{$_.GetAvailableWebTemplates($_.Language)} | fl *

Custom list will appear at the end of the result...

If you properly check this GUID it is different than that which you see in solution gallery..

shirsath44 Jul 31, 2012 at 10:45 AM 
Hi all,
If you have custom template and want to create site using I love SP,
specify template as {guid}#siteTemplatename

you need to get the guid of the template from using the following powershell script,
Get-SPWeb http://sps2010:007/Codeplex | %{$_.GetAvailableWebTemplates($_.Language)} | fl *

Custom list will appear at the end of the result...

If you properly check this GUID it is different than that which you see in solution gallery..

Oeuviz Jun 19, 2012 at 9:39 AM 
This is seriously some great stuff here! Thanks a lot for this project!
I just have a question on what I might do better.. When I create a Site, everything works properly but I'm missing my standard permission groups (visitors, members, owners). Is there a way I could let the workflow create and assign the groups as it is done using the standard user interface?

hishailesh77 Jun 6, 2012 at 4:34 PM 
Please use following powershell command to get full name of web template

$site = Get-SPSite -Identity http://sharepoint
$site.GetWebTemplates(1033) | Where-Object {$_.name -like "*[TemplateName]*"} | Select Name

Poodle Apr 10, 2012 at 6:03 PM 
I had a problem publishing the workflow to create a site until I used all workflow variable and not values from the current item (an InfoPath form library). This is awesome! Thanks

CGrunert Feb 22, 2012 at 8:20 AM 
Have just the same issue like syrowe. Using the 'Create a Site" action terminates the workflow with 'Die Sprache wird vom Server nicht unterstützt.' means the langauge is not supported on this server. But I used '0' for inheriting the language of the parent site. Also using '1031' doesn't change anything. I thought this problem got already solved. ;-)

syrowe Jan 18, 2012 at 10:08 AM 
Thank you for this it is really helpful, or rather it would be. I keep getting an error telling me that "The language is not supported on the server." I have tried 1033 and 0 but get the same response every time. Any ideas on what I might be doing wrong?

cglessner Dec 15, 2011 at 8:37 AM 
@michelebolos: Wasn't able to repdoduce the issue. You should find the error in the error variable of the action and in the SharePoint ULS Log.

michelebolos Dec 14, 2011 at 9:50 PM 
Thanks for the feature... this is exactly what I was looking for. I'm having an issue though. I had no problems installing the feature and activating it. The issue I'm having is after creating a workflow that uses the "create site" action, I receive no error, the workflow says it completed but the site is never created. Where are the errors logged so I can see what is going on? Thanks!

mdsiddiqali Aug 26, 2011 at 6:37 AM 
I worked on this but when i run the command to get all the templates Name in Power shell.Title of my template is truncated .And other then i.e when i publish the workflow it shoes error as "Errors Found While Compiling the Workflow.Workflow Saved but can not be run" .And when i click Advance button in window in error message box it shows message as below
" (0, 0) Activity 'ID15' validation failed: Path resolved to Referenced activity Property 'ReturnValue' whose PropertyType 'System.Object' does not match with the Target Type 'System.String'.)"
Hope you respond to me to my mail mdsiddiqali@hotmail.com

eegiffin Aug 23, 2011 at 11:36 PM 
I figured out the solution to my problem. The Create Site Action, for whatever reason, really didn't like using field values from the workflow's current item (maybe because of the list type *shrug*). So, I first added some SharePoint Designer workflow variables for the information I wanted from the current item fields and used "Set Workflow Variable" actions to populate the new workflow variables. The Create Site action validates now that I am using workflow variables instead.

eegiffin Aug 23, 2011 at 12:57 AM 
I am also getting the error "Path resolved to Referenced activity Property 'ReturnValue' whose PropertyType 'System.Object' does not match with the Target Type 'System.String". I am trying to use the create site action for an approval workflow associated with an InfoPath Library.

sgeisbert Aug 16, 2011 at 12:23 AM 
alirobe - I am getting the same error. Did you ever get this resolved? I have a workflow running on a custom list, but I get this error when I'm trying to publish. I have a workflow running on a form library on the same site that uses the Create Site Action and it works perfect. What could be the issue, the custom list? I appreciate any help.

Error: Path resolved to Referenced activity Property 'ReturnValue' whose PropertyType 'System.Object' does not match with the Target Type 'System.String

Thanks.

alirobe May 30, 2011 at 7:53 AM 
Does anyone else get " Path resolved to Referenced activity Property 'ReturnValue' whose PropertyType 'System.Object' does not match with the Target Type 'System.String " when trying to publish?

skiptheb Apr 13, 2011 at 2:26 PM 
Get-SPWeb http://contoso/sites/spd | %{$_.GetAvailableWebTemplates($_.Language)} | format-table -auto

All columns are displayed in Fullwidth!

NickC4555 Mar 8, 2011 at 10:37 AM 
This is a great action, but I can't use it to create a site from a custom template because their names are truncated in the powershell output. Does anyone know another way of finding the full name of a custom template? I can find my templates in the solutions table in the content database, but the name column isn't there.