Jun 9, 2012

Released: Sandboxed SharePoint Workflow Actions

Hey guys, I’m happy to announce that I published a first release of some sandboxed workflow actions! The first version includes the highly desired “Create Site”, “Create Group” and “Add User to Group” actions. With this set of actions you can easily create new sites and assign permissions to them. And the best thing is, this works in Office 365 too!
You can download the solution here.

Install the Sandbox Solution

  1. Go to “Site Settings”->”Solutions”
  2. Upload the solution “iloveSharePoint.Sandbox.WorkflowActions.wsp”
    image
  3. Activate the solution
    image
  4. Ensure that the “iLove SharePoint Sanboxed Workflow Actions” Site Collection Feature is activated.
    image
  5. Open SharePoint Designer and check that the new actions are available. You can find the actions only within an impersonation step!
    image

    image
  6. Done.

Create Site Action

This action creates a new sub website. It requires the following parameters:

  • URL: Leaf name for the new site e.g. “subsite1”
  • Title: Title of the new site.
  • Description: Description of the new site
  • Template: Template for the new site. You can either specify the name (e.g. “STS#1”) or the title (e.g. “Team Site”)
  • Language: The language code for the new site (e.g. 1033=English). If you specify 0 or –1 it will inherit the language from the parent site.
  • Inherit Nav: Specifies whether the new site will use the same navigation as the parent site or not.
  • Top Nav: Specifies whether the new site will be add to the top link bar of the parent or not.
  • Quick Nav: Specifies whether the new site will be add to the quick launch of the parent or not.
  • Unique Permissions: Specifies whether the new site will have unique permissions or not.
  • Output: Url of the new site
  • Error: If an error occurs the workflow will not fail. You have to check if the error variable is empty or not!

image

image

Create Group Action

The create group action allows you to create SharePoint groups from within workflows. With this action you can easily create new groups in sites that you have created with the “Create Site” action. The action requires the following parameters:

  • Group Name: Name of the new group.
  • Site: Absolute Url of the the site. If you leave this parameter empty, the group will be added to the current site. Although you specify an absolute url of a site this action only works within the current site collection! You can use the output url of the Create Site action here.
  • Owner: Owner of the new group.
  • Description: Description of the new group.
  • Permissions: Permission for the new group. One line per permission level.
    image
    image
  • Error: If an error occurs the workflow will not fail. You have to check if the error variable is empty or not!

image

image

Add UserS to Group Action

With this action you can add users to a group. The action requires the following parameters:

  • Users: The users to add to the group
  • Group Name: Name of  the group to add the users.
  • Error: If an error occurs the workflow will not fail. You have to check if the error variable is empty or not!

image

image