Step by Step Guide in Developing your own Workflow in Sharepoint 2010

By | November 3, 2010

Workflows are a real poweful tool built-in in Sharepoint since 2007 version as you can design it to add logic to your site or application without any custom coding!  This can be anything from automating business processes, sending notifications or even as simple as creating tasks.  There are a lot of possibilites which is only limited by your imagination.

This article will discuss how easy it is to develop your own workflow in Sharepoint 2010, you dont even have to be a developer as you will not write any custom codes and all you have to do is just a series of mouse point and clicks.  To get started we need an entry point in the workflow, this will act as a trigger to start the process and one good example that we can use is when someone add an item to a list.  So this sample solution we will be developing a workflow to trigger from a list and based on the selection on one of the list column values it will trigger an email to be sent and update the items status.  Using this example I guess we will be tackling most of the imporant aspects of workflows such as steps, conditions and actions.

So lets start!

Lets start by creating a list and here is the structure.

Now for a bit of explanation here is what each fields do

Title – That will be the subject of the email you will be sending
User Email – The recipient email address
Message To user – The message in the email
Status – Whats the status of this item (choice between Started, Email Sent, Processing, Resolved)
Send Email – A flag whether email will be sent to recipient.

Once you created the list fire up Sharepoint Designer and start creating your workflow.  First go to List and Libraries

Choose your list and go to the Workflow section then create new

It will ask you to define a Workflow name and description

Now, the workflow designer shows

.

Now if you notice on the ribbon there is a Condition and Action Button, there are the key elements for designing the workflow, examine the items inside and these as it will list all the possibilities you can do.

Workflow Action Items

Workflow Condition Items

On on your Step 1, we choose “Email users” (this means when the workflow starts it will email a certain user of your choice)

Now define the Email Message

On the “To” section, choose users.  At this point we choose the email address stored on the list item.

We select that “User Email” column you created on your list

Now on the CC, you will add the one who added the list item.

For the title, we will get it from the “Title” column in your list

And for the body you choose the “Message to user” column in yousr list as well as the “Modified by” field

Congratulations! Your done with you first action, now lets add a condition on that action

Click on the top of the first action you had created

Add a common condition “If any value equals value” which means if a certain column in that current item falls in a value that you declare an action will be triggered

Now the condition appears on top of your first action

Now modify the values to what you want, since you want an action to happen when “Send Email” field has a value of “Yes” then define as such.

If you had noticed the First action you created was not on the IF block, so you need to move it up, to do that choose the drop down on the side and choose move action up

This will then place it inside the IF block

Now in this scenario lets say you also want to update the field “Status” to “Email Sent” when the email sent.  To do that, add another action by choosing the “Set Feild in Current Item”.  Make sure that you also click below your first action so that when you add a new action it will be placed there.

Now set the field and value properties

Now for your ELSE block, choose the “Else-If Branch” from the ribbon

Now do the same action above but this time set the “Status” to “Processing”

Now your all done!  Save and publish your workflow

Then, wait while its validating

But wait you need a trigger on when the workflow will start.  Do that by going to the Workflow objects, choose your workflow and configure it on the start options

Now all you have to do is test, create a list item to trigger conditions you built

Then wait for the results

Thats it! its that easy, no coding required!

Recommended

21 thoughts on “Step by Step Guide in Developing your own Workflow in Sharepoint 2010

  1. Pingback: Configuring Sharepoint 2010 to Accept Incoming Emails « Raymund Macaalay's Dev Blog

  2. Pingback: Sharepoint Workflow does not trigger on e-mail created List Items « Raymund Macaalay's Dev Blog

  3. Aaron

    this is a great intro to SharePoint 2010 Workflow design… I wish I’d had this last week when I started learning about workflows… you go through all the steps, provide customization, and even end up with something useful.

    Reply
  4. mike

    Can’t see any images that you have posted on this page. Can you fix? -thx

    Reply
  5. Hubert

    Great post but my workflow does not trigger after recieving an e-mail. It only works when I modify an item eventhough I check start workflow after item has been created. can you please help?

    Reply
      1. joeprakash

        I managed to get the outgoing email working. I need some guidance in terms of setting up incoming email settings. I tried all configurations in terms of central administration and the library.

        Reply
  6. sunil

    i am having issues setting up this workflow.I do setup the workflow..in my case i want to send out a mail to a resource once a resource has been assigned. The email doesnt seems to come….

    Reply
    1. rsmacaalay

      You have to do that on Sharepoint Central Administration. Under system settings and “configure outgoing e-mail settings”

      Reply
      1. sunil

        Ah ok.. i think that is already configured as this is an enterprise server and email alerts are working for other workflows like getting alerts to creater etc…

        Reply
  7. Tre

    Thank you very much, I’ve spent weeks looking for a straightforward way to do this!

    Reply
  8. Robert C

    This is a great Tutorial – Thanks. Would you happen to have the time or inclination to do a follow-up tutorial on how to make this message go out every Friday (or whatever day is necessary)? In other words, I have a task list and I need to send reminders to the “Assigned To” person every week for them to update their assigned task based on the task’s status eg. In Progress, but not sent if status is Completed.
    Thanks in advance for your help.

    Reply
  9. Abilash

    Hi–This is a great tutorial, i got this working but only problem is when e-mail is sent to a particular user, the incoming e-mail has some crap fill in it along with the body of the e-mail. I am unable to resolve the issue, could you please help me out with this?

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.