Embedding Images in Notifications

  • 5 December 2014
  • 5 replies
  • 52 views

Badge +3

I'm trying to embed (link, actually) an image stored in an accessible SharePoint library into an email notification. One problem I'm experiencing is that Workflow keeps changing the URL after I edit this change and so I think I need to specify and absolute URL but don't know how.

Example:

Actual location: https://share.domain.com/sites/PELLUCID/Images1/notice.png‌  <- Placed within the quotes for img src

Revised by Workflow:  <img src="/sites/PELLUCID/Images1/notice.png">

The image is not presented when the email notification is received.

Suggestions?


5 replies

Userlevel 7
Badge +11

Is it a case of outlook stopping the image ? I've had this happen..

If this is different, maybe try

The web url is a common token you can insert..

Sent from my Windows Phone

Badge +3

I have never used tokens before so I will need to take a little time to learn and test. Any tips or suggestions would be welcome.

Userlevel 6
Badge +12

Stuart Thomason‌ - 

I know this is going on almost two years and I hope that you have this resolved, but for the rest of the community, I wanted to shed a bit more light on this topic.

The token that Chit Siang Chew‌ and Dan Stoll‌ referred to can be found in the Common section when insert references:

190595_pastedImage_1.png

This build the full URL where the workflow resides. The same can be used for other things such as web service calls and building task approval/rejection URLs.

Badge +3

I suppose I need some examples of how it this actually looks to understand how I'd apply it. I'm far from being a day-to-day NWF guy.

This inspired me to go back and test the basic insertion of a picture from an address and <shrug> it works like you think it should now.  I'd still like to understand how the use of web URL and tokens works.

Userlevel 6
Badge +12

Sure thing ‌!

You would want to use the token is situations where you don't necessarily want to "hard code", or type out the entire (use the absolute) URL. This allows you to move the workflow and/or list to another site (say from a test environment to a production environment) and not have to worry about the URL breaking. A lot of native SharePoint will do this without even asking or users noticing (check out your site navigation, this happens all the time by default!), and does it for the reasons stated above.

I use them a lot for call web services on lists and sites as I will develop them in test, make sure I am getting the results I need, and then pick it up and move it over to production. Since I am using the token, the workflow will figure out where it is running, and call the appropriate services rather than trying to reach back into another environment.

Reply