Your team uses the Shared Documents library to collaborate on documents, and your team uses the Assigned To column to track whom documents are assigned to. Instead of having all members of the team continually checking the team site to see if they have documents newly assigned to them, you want to create a workflow that automatically sends an e-mail message to any team member when they receive an assignment. You can quickly do this by creating a one-step workflow.
Perhaps you are thinking, why not use an alert? Alerts offer many options — for example, you can receive an alert when an item is added or modified. But you cannot set up an alert for when a specific column is changed to a specific setting. Plus, with an alert you cannot create an e-mail message that tells the recipient exactly what action is required.
To learn more about workflows, see Introduction to workflows.
Important To create a workflow, your site must be located on a server running Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007.
In this article
Before you begin
Before you design the workflow, you need to make any necessary changes or customizations to your site, list, or library — for example:
- A workflow is always attached to exactly one SharePoint list or library. Your site must have at least one list or library before you create a workflow. If there are no lists in your site, you are prompted to create one when you create a workflow.
- If you want your workflow to use any custom columns or settings, you must make those changes before you create the workflow so that those columns and settings are available to you in the Workflow Designer.
- If you want your workflow to use any list or library features that are not turned on by default, such as Content Approval, you must turn on these features before you design the workflow.
Note The workflow feature is built on the Microsoft Windows Workflow Foundation, a component of Microsoft Windows. The same version of the Workflow Foundation must be installed on both your computer and the server. The first time that you create a workflow, you may be prompted to install the Workflow Foundation.
Add a column to the document library
This example uses the Shared Documents library, which by default appears in a team site. However, you must add the Assigned To column to the Shared Documents library because this column does not appear by default in the library.
- In the browser, go to the Shared Documents library.
Tip Click Shared Documents in the Folder List, and then press F12.
- On the library toolbar, click Settings, and then click Add Columns from Site Columns.
- Under Available site columns, click Assigned To, and then click Add.
- Click OK.
When you view Shared Documents in the browser, the Assigned To column now appears in the library.
- Close the browser.
Top of Page
Design the workflow
After you set up the Shared Documents library with the correct column, you are ready to use the Workflow Designer.
- Start Office SharePoint Designer 2007.
- On the File menu, click Open Site.
- In the Open Site dialog box, browse to and select the SharePoint site where you want to create the workflow, and then click Open.
- On the File menu, point to New, and then click Workflow.
The Workflow Designer opens.
- In the Give a name to this workflow box, type Assignment Notification.
Site visitors will see this name when they view the Workflow Status and Workflows pages in the browser.
- In the What SharePoint list should this workflow be attached to? list, click Shared Documents.
When team members view the Shared Documents library, they will see a new column for this workflow called Assignment Notification. This column indicates the status of the workflow for each item — for example, whether the workflow has started or completed.
- Under Select workflow start options for items in Shared Documents, do all of the following:
- Clear the Allow this workflow to be manually started from an item check box.
- Select the Automatically start this workflow whenever an item is created check box.
- Select the Automatically start this workflow whenever an item is changed check box.
By choosing these options, you ensure that the workflow runs every time an item is created or changed. The first page of the Workflow Designer should now look like the following.
- Click Next.
- Click Conditions, and then click Custom Condition (Shared Documents) in the list.
The condition If field equals value appears in the workflow.
This list provides many ready-made conditions, but you want to create a condition where the workflow sends the message only when a specific field — in this case, Assigned To — equals a certain value — in this case, the name of a person on your team. To accomplish this, you create a custom condition.
- In the condition If field equals value, click Field and then click Assigned To in the list.
- In the condition, click Value.
The Select Users dialog box opens. You want to choose a member of your team. You can do this by typing their name or e-mail address and then clicking Add, or you can select from the list of existing users. You can also select users from the Address Book or look up names from a list or list item.
- Type or select a user name or address, click Add, and then click OK.
- Click Actions, and then click Send an Email in the list.
If this action does not appear in the list, click More Actions, click the action that you want, and then click Add.
- In the action Email this message, click this message, and then complete the form by entering the recipient, subject, and body text of the message.
On the To line, you want to enter the same name or address that you chose as part of the condition.
- Click OK.
You now have a rule where if an item in the Shared Documents library is assigned to a specific team member, that person receives an e-mail notification. But what if the document is assigned to a different team member? Next you will create an "else if" condition for each additional person on the team.
- Click Add 'Else If' Conditional Branch.
A conditional branch is added to the workflow. Repeat steps 8–14 of this procedure to create the same rule for a different team member.
- As necessary, click Add 'Else If' Conditional Branch to add a rule for each member of your team whom you want to be notified when a document is assigned to them.
- To check the workflow for errors before you exit the Workflow Designer, click Check workflow.
If there is a workflow error, the hyperlink changes color and asterisks appear before and after the invalid parameter. In addition, under Workflow Steps, an error symbol appears next to each step that contains an error.
- Click Finish to save the workflow.
To test the workflow, browse to the Shared Documents library, create a new item, and set the Assigned To column to a person included as a condition in the workflow. Check to see if that person receives the notification message that you created.
Top of Page