Workflow example: Send a notification message

For the most up-to-date information on creating alerts for notification see Create an alert or subscribe to an RSS feed. If you're using SharePoint Online lists, you can also use Flows to create notifications via email, and other channels. For more info, see Add a flow to a list in SharePoint Online.

Note: This topic information related to SharePoint 2007 only.

Updated December 12, 2016

To learn more about workflows, see Introduction to SharePoint workflow.

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.

Before you begin

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.

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.

  1. In the browser, go to the Shared Documents library.

    Tip: Click Shared Documents in the Folder List, and then press F12.

  2. On the library toolbar, click Settings, and then click Add Columns from Site Columns.

  3. Under Available site columns, click Assigned To, and then click Add.

  4. Click OK.

    When you view Shared Documents in the browser, the Assigned To column now appears in the library.

  5. 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.

  1. Start Office SharePoint Designer 2007.

  2. On the File menu, click Open Site.

  3. In the Open Site dialog box, browse to and select the SharePoint site where you want to create the workflow, and then click Open.

  4. On the File menu, point to New, and then click Workflow.

    The Workflow Designer opens.

  5. 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.

  6. 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.

  7. 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.

      First page of Workflow Designer

  8. Click Next.

  9. 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.

  10. In the condition If field equals value, click Field and then click Assigned To in the list.

  11. 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.

  12. Type or select a user name or address, click Add, and then click OK.

  13. 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.

  14. 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.

  15. Click OK.

    Second page of Workflow Designer showing condition and action

    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.

  16. 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.

  17. 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.

    Workflow Designer shows rules with conditional branching

  18. 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.

  19. 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

Expand your skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.