Categories

Automatically Create a Site Using SharePoint Designer Workflow

Automatically Create a Site Using SharePoint Designer Workflow

In the event that a site needs to be created when an item is added to a list, users are able to manually create the site from the out-of-the-box templates or even a customized template if one has been created. To avoid users having to perform these manual steps and take the chance of them creating the site incorrectly, the custom "Create a Site" action from ILoveSharePoint which can be downloaded free is the perfect tool.

This action, along with other custom actions that are included in the package, can be used for both SharePoint 2010 and SharePoint 2007 and has been implemented successfully for a number of different scenarios including:

  • Project Sites when a PO is received
  • Customer Sites for a new lead
  • Proposal Sites to manage the sales documents when a quote  is due

Implementing the workflow can be a bit tricky and the inputs depend on which version of SharePoint you are running. However, once the workflow is complete, the time saved by your users and your time saved fielding questions are well worthwhile.

General Tips

  • Be sure that the URL does not include any spaces or special characters
  • The workflow takes a few minutes to run so don’t assume that it didn’t work until you have given it at least 5 minutes
  • It is possible to automatically create nested sites however careful planning for the taxonomy should be taken

SharePoint 2007 Tricks


 

  • The "create a site" action does not actually say create a site so don’t worry if you have the right one
  • The location in which the site is to be created (URL) already has the path of the current site, therefore, your input should only be the remainder of the desired URL.  For example, if your action runs on a list that is at https://sharepoint.dmcinfo.com/customers and you want your site to be located at https://sharepoint.dmcinfo.com/customers/projects/[newsite] your input is only projects/[newsite]
  • The template is the name of the template .stp so your input would be customtemplate.stp
  • Inherit Permissions is backward, if you want to inherit from the parent select NO, if you don’t want to, select Yes
  • There is no way to inherit the top navigation bar from the parent

SharePoint 2010 Tricks



*Click to enlarge code

The location in which the site is to be created (URL) should be the full path so your input should be https://sharepoint.dmcinfo.com/customers/projects/[newsite]

  • The template is the ID of the template and not the name.  Accessing the ID is not very straight forward but here is one way that works if you are using SharePoint Server 2010

1. Navigate to the Page Layouts and Site Templates Page in Site Settings
2. Right-click on the page and click View Source

3. Hold down CTRL and F key on the keyboard
4. Type in the name of the template and click search
5. Click next until you can see a list of all the site templates and find the latest version of the Template that has been created
6. Select the ID number in between the two " and copy this information

 

Learn more about DMC's SharePoint workflow services.

Comments

Ann
# Ann
Hi,
I am getting error when I provide full url of the site where I want to create a sub site. Give me "contains illegal character ':' " message in error.
How is your working when you enter full url? My environment is 2010. I entered partial url, it create site with site name like subsite/subsite1.

Any suggestion?

Thanks
Rocco Castellano
# Rocco Castellano
Good Article. I'm using 2010, I have been looking for a solution for this for some time and found it with a free product called "I Love SharePoint" they have a item that inserts an "impersonation step" in a workflow. After using it for some time I can say it works beautifully. Install was easy but the documentation was a little weak but it was a simple upload to the central admin and after that, took a couple of tries to get it going. I then built a simple workflow with this impersonation step and it auto creates the site without any coding. you can check it out at (http://www.ilovesharepoint.com/2012/06/released-sandboxed-sharepoint-workflow.html) I hope it helps you out. If you have questions I'm on twitter at RoccoNH1 and I will try to help.
t.bores
# t.bores
Hi Anjali,

Ive been reading this article because i had to create a site from workflow in a sharepoint 2010 installation and it works great with the ilovesharepoint workflow. However in your article i read that it works in sharepoint 2007 and 2010 but when i read the comments at:
http://www.ilovesharepoint.com/2012/06/released-sandboxed-sharepoint-workflow.html
the following is said:
Fia lia said...
It looks very nice! greatwork.

I got a question but does this also work with sharepoint 2007 and SPD2007.

Im asking cause in the manual i see that u have to create an 'impersonation step' which is an option i cant find in SPD2007.

July 16, 2012 4:34 PM
Christian said...
Fia lia, the actions will only work in SharePoint 2010.

so i dont think this solution works for 2007. Do u use a special trick to make it work in 2007 :)?

once again thx for the article it helped me alot.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Categories

Related Blog Posts