Wednesday, May 23, 2012

How do I embed a graphic into a SharePoint Designer workflow?

Many of our customers want the ability to "pretty up" the emails that get sent out from workflows.  One thing that will help enhance the readability of emails is to embed graphics inside the email.

Within SharePoint Designer, you cannot technically "embed" an image.  However, you can embed a link which points to an image.  That being said, the typical approach is to save an image to your SharePoint site, typically a "Site Pictures" picture library.  Once you have the image you want to embed into your email on your SharePoint Site, simply copy the URL to the image use it within a workflow variable in your "Send an email" workflow action.  To do this, create a "Local Variable" called "ULINC Image", then add an action to "Set Workflow Variable".


Use the following value for your variable, swapping out the URL to your specific URL:
<img src="http://ulinc/Site%20Pictures/ULINCNotification.jpg"/>

Next, add a "Send an Email" action, or select one that already exists.  Open the "Define E-mail Message" window and select to "Add or Change Lookup".  Select the workflow variable for which you just assigned a value.


When you are done, your email should look something like this (note the [%Variable: ULINC Image%] tag):


Once this is complete, finish defining the contents of your workflow email and publish the workflow.  It's that easy ... well it's easy once you know how, and now you do!

21 comments:

  1. I followed your instruction but my image is still not showing once l send the email

    ReplyDelete
    Replies
    1. The first thing I would check is to ensure the link is correct. Copy the URL from the link in the email and paste it into your web browser and see if it renders there.

      Second, ensure that your email client is downloading images. You can add the sender of the email (SharePoint) to the safe senders list in Outlook, that way it will always download those images.

      Delete
  2. Hi there,

    I'm trying to add a picture and have followed your guide, but the picture still isn't showing properly. I've added my SP email to the safesenders list and it still doesn't work. Link to the picture works fine if I paste it into explorer...

    ReplyDelete
  3. Thanks Thomas!!! it worked! the only thing is that the one who recieves the email has to download the picture..

    ReplyDelete
  4. I tried uploading my picture into a Site Assets library first and the pic was not showing up in emails. I then found this page (http://social.technet.microsoft.com/wiki/contents/articles/8110.sharepoint-2010-best-practices-asset-versus-picture-library.aspx) and discovered that I needed to upload my pic into a Picture Library instead. After doing this the tutorial worked for me. Thanks!

    ReplyDelete
  5. Any chance of updating site theme or re-uploading the screen shots so we can see them ?

    ReplyDelete
  6. Here is a link demonstrating how to embed the image in an email without having the user download it... http://dcsharepointchick.blogspot.com/2013/09/embed-image-in-sharepoint-outgoing.html

    ReplyDelete
  7. That was really cool, thanks!

    ReplyDelete
  8. Thanks a lot, that saved my day :)

    ReplyDelete
  9. Thanks...Still not working in SPonline -

    ReplyDelete
  10. Thanks! Excellent instructions :)

    ReplyDelete
  11. Hi,

    I have an requirement where user will select image from Image library and it will get mebed in the mail attachmnet . How to set this random image embedment in sharepoint?

    ReplyDelete
  12. HI Thomas
    could you please update the clear work instructions image.. since the work instructions images are not clear...Thanks in advance..

    ReplyDelete
  13. Had this working then something happened where all we get is a red X in the email. The link is correct and it works in a browser. Sort of lost!

    ReplyDelete
  14. Thanks a lot, worked for me :)

    ReplyDelete
  15. I can not use this with SharePoint Online, when the email arrives the image don't appear :(

    ReplyDelete
  16. Its not working for me. My workflow is getting suspended because of that embed image in workflow configuration

    ReplyDelete
  17. Thanks Buddy, Its working for me :-)..

    ReplyDelete