0 Replies Latest reply on May 3, 2017 8:50 AM by Matt Coles

    Tip: Embed images directly in an email

    Matt Coles

      Let's say that you have a static image you want to put in your email blast reports, or an alert you've got set up. Let's say that you want to put a logo at the top of each email that goes out:




      How could you do that with VizAlerts?


      Well, given that VizAlerts supports HTML formatting in your emails, the most obvious thing is to find the image you want, and use an <img> tag to tell the email to present the image right there. You could then put it in your Email Header ~ field, like so:



      That technique can certainly work well, and gives you a lot of flexibility in how the images are presented. But it has two potential issues:


      1. The image has to be hosted somewhere that all of your email recipients would need access to (usually, on a public web host).

      2. If the recipients of your email haven't opted to display external images in their email client, they'll initially see this, instead of your beautiful image:




      There's a better way!


      An alternative approach that solves both of these issues is to have VizAlerts directly embed the image in the emails that are sent. Turns out, you can do that by making use of Tableau's ability to add images directly to a dashboard, and VizAlerts's content reference feature.


      First, create a new Dashboard in your workbook (or a new workbook--doesn't matter), that simply contains your image:




      Now, resize the dashboard so that it fits closely around the image:




      Get those pixels just right...


      Okay, now name your new image-dashboard something simple:




      Now, all you need to do is reference your image as a VIZ_IMAGE content reference in your trigger viz, wherever you want it to be in your email:



      Now, when your alert fires and the emails go out, they look like this:





      BONUS TIP!


      Because the image dashboard doesn't have to live in the same workbook as your trigger viz, you could create a workbook whose purpose was to do nothing more than serve as a repository of commonly-needed images for all your alerts, across your organization. Each image would be a separate Dashboard in your workbook, and the whole workbook could be made accessible to All Users on Tableau Server, thus allowing anyone who wanted to embed an image in their workbook to do so, simply by adding the content reference--no need to do the work of adding their own image as a separate dashboard!



      Just tell everyone that if they want a logo or any of the other images you've created for them, all they need to do is add this text in their field:




      Hope that tip is useful for everyone!