We have a list workflow that sends email notifications to different users and admins depending upon the stage and type of service request. The body text of the notification email is different for each kind of user or admin and each kind of content and includes different pieces of information from the current list item.
Additionally the contents of the emails change frequently. So I didn't want to have all the email "templates" stored inside the workflow. Not everyone on our team has access to SPD, nor the skills to open a workflow, make a change to a variable, and publish it successfully.
My idea was to set up another list of the templates with each list item marked for which type of request and which stage. This way many of our admins could go in and update the templates as needed.
So I set that up and have the workflow is pulling up the correct template. But now I want to mix in the information from the current item.
For example, if the body text was in the work flow it would look something like this in the string builder if the template text was assigned to a workflow variable:
Hello [%Current Item:Created By%]
We have received your request for [%Current Item:Title%]. It will be processed in the next 24 hours.
With the [%Current Item:Created By%]
and [%Current Item:Title%]
having been added with the Add or Change Lookup button.
But I want to pass a string from a list item. How can I indicate that there is a look up in those places? I tried typing what the string builder would show, but of course that didn't work, because the look ups are more than just some text.
Basically I want to do a mail merge. Is there a way to do this?
Is there some different way to keep the text for emails out of SharePoint Designer?
Edit
I was going to try some string handling so I create a variable in the workflow and added some [%Current Item:Created By%] (typed, not inserted with the Add or Change Lookup button. I get an error message
Using the special characters '[%%]' or '[%xxx%] in any string, or using the special character '{' in a string that also contains a workflow lookup, may corrupt the string and cause an unexpected result when the workflow runs. So that is interesting....