1,437 articles and 9,853 comments as of Sunday, March 14th, 2010

Tuesday, December 1, 2009

Quick & Dirty SharePoint Email Templates

Mark RackleyGuest Author: Mark Rackley

The SharePoint Hillbilly

Good news, this is my first video post, so less typing for me!  Bad news, you have to hear my eloquent voice.  Regardless, I thought I’d try it out and see how it flies.

So, a requirement popped up to allow the business to store “Contact Us” information in SharePoint and use workflows to manually send emails to the people who submitted the contact information.  Very easy.. nothing spectacular.  They also wanted the ability to send pre-formatted email templates as responses.  Also fairly easy to do creating an SPD workflow for each template, right?  Well.. what do you do so that you don’t have to open up SPD every time the user wants to add or modify a template?  I came up with the following solution.  You could take what I did here and build upon it to make it much more elaborate.  I’m sure you could format the emails more professionally.  You could auto populate more fields like the subject and signature. Hey, I got it started, you can make it world class.

So, in a nutshell here is what I did:

  1. Create a list to contain “Contact Us” information
  2. Create a list to hold “Email Templates”
  3. Create a manual workflow called “Send Email” in SPD on the “Contact Us” list that has a “Message” initiation variable
  4. Create one action that sends an email to the email address from the “Contact Us” list and the body of the email is the “Message” from the initiation variable
  5. Open up the .aspx file for the “Send Mail” workflow and add the “Email Templates” list to it.
  6. Set up a web part connection between the “Message” initiation variable and the “Email Templates” list

That’s it! nothing earth shattering.  So, without further ado, here’s the video.  Please let me know your thoughts on whether I should do this more often or make this a one time occurrence.  


Mark RackleyGuest Author: Mark Rackley

Mark has been developing software applications for over 15 years filling the roles of Project Manager, Business Analyst, Lead Developer, and Software Architect.  He has been involved in projects for such companies as Dell, Motorola, Intel and Agilent Technologies. He has worked in large corporate environments, small software start-ups, and as a consultant.  Mark currently works for UNFI where he was introduced to the world of SharePoint and has taken on a lead SharePoint architect role within his organization making key development, administration, and architecture decisions.  Mark’s goal is to help ever new architect and developer avoid the frustrations and brick walls he ran into while learning SharePoint.

Blog:  http://www.sharepointhillbilly.com
Email: [email protected]
Twitter: http://www.twitter.com/mrackley

 

 

Please Join the Discussion

6 Responses to “Quick & Dirty SharePoint Email Templates”
  1. Great resource!!! Thanks.

  2. Tony says:

    Nice but what if you have a list of 200 contacts and you want to send a mail to 20 of them? You can’t select the 20 and run the workflow for that 20 can you?

  3. Jeffi Sannapu says:

    Mark – This is an ingenious solution. Thank you for taking time to posting this video. This has open a window of solutions. One question..can we make that workflow automated to start with the insertion of each new list item and than as part of workflow we pick the specific template based on Some criteria like what organization that email belong to? I think we may be able to do that….based on what you showed, but I wanted to get your quick thoughts before…embark on another SP debugging session and letdown :-)

    Thank you

  4. Mark Rackley says:

    Jeffi,

    Basically you are wanting your workflow to auto-pick the template to use on item creation? correct?

    You should definitely be able to do that. You would have to make your workflow aware of all the templates though, which means that when you add a new template you would need to modify the workflow (If I’m understanding you correctly).

    Good luck!
    Mark

  5. Jeffi Sannapu says:

    Something to that degree. I’ve created subscriber list on my SP blog and wanted to create template messages to welcome new users, post notification and such. So that the workflow can pick-up the right template when notifying the users based on the workflow conditions. I’ll go ahead and try it than :-)

    Thank you again

  6. Dan says:

    Very useful and insightful video, Mark. Thanks for posting!


Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!