How can I add images to the body of email notifications sent by triggers or automations?
To include images in business rules notifications, change to the Email body of the rule to include an HTML tag.
HTML allows you to reference the location of an image and have the email body display the image itself, rather than the URL of the image or file path. Use an image tag that looks like this:
<img src="image_url">. Host the image online for the workflow to work. If you don't have somewhere to host the image file, upload it as an asset in your help center.
To include an image in the body of a trigger notification
- Find the image you want to include in the email body and get the direct URL for that image.
For example, the image below has this direct URL: https://d1eipm3vz40hy0.cloudfront.net/images/social/twitter-zendesk.jpg
- In the email body of the trigger's action, include
<img src="image_url">and replace the image's direct URL where it says
- Test your trigger to make sure everything looks correct. Add a trigger condition so the trigger only fires on your test ticket, for example, add the condition Tags | Contains at least one of the following |
testforhtmland then check the email notification you receive.
You can also use HTML to do things like resizing the image so that it looks more in line with the rest of the email. Learn more with w3schools.
Hi what's up team!
I'm also having the issue - very simple HTML in the email notification to add our logo, but simply doesn't show up in my test in Gmail.
Have tried it very simply like this:
<img src = "https://cdn.theblueground.com/website/98b845aa5a212a827852c959a2c37f8279596c5e/img/logo-icon-wordmark-blue-main.920c560952f9e0e069e88a196a299dfe.svg">
And with a little more formatting:
<img src = "https://cdn.theblueground.com/website/98b845aa5a212a827852c959a2c37f8279596c5e/img/logo-icon-wordmark-blue-main.920c560952f9e0e069e88a196a299dfe.svg" alt="Blueground" width="175" >
It shows up with the little "no image / bad image" thumbnail (adding image below).
Thanks a million :)
Thank you for reaching out to Zendesk Support.
In regards to your concern, there's a setting in Gmail to turn on/off images. I have found this from Google, (https://support.google.com/mail/answer/145919) on how you can check the image settings in your Gmail account.
I would also suggest you to clear your browser's cache and cookies to make sure there won't be any caching issues.
Thank you and have a wonderful day ahead!
DJ Buenavista Jr. |
Customer Advocacy Specialist | Support@Zendesk.com
Yo what's up @...
Thanks for the help! That setting has always been on under my Gmail account.
Since clearing cookies/cache causes other pains - I went to my iPhone and checked the gmail app .. no rendering. And also checked Safari as a separate browser I never use, so no cookies/cache = no rendering the image either.
So I'm still stuck :/
I opened a chat ticket with Maude (ID tbd, chat still open) - but they said they'll do some testing.
But any other ideas are welcome. :)
I'm sorry to hear that you are still not able to fix this issue. The issue seems to be a little more complicated than expected and will need a thorough investigation it seems.
I would advise waiting for Maude to provide any updates and findings of his investigation.
DJ Buenavista Jr. |
Customer Advocacy Specialist | Support@Zendesk.com
Hey Blueground, the issue rests with the image file type being used.
SVG isn't supported by Gmail, as they're blocked by Gmail's proxy. You could however try using another file format.
OP probably figured this out long ago but I figured I would post my experience here for future readers.
I was having same problem as OP. This was with .PNG file format though, which I know is supported because I'm using PNG images in my CSAT survey email. It turned out my problem was an erroneous space between the end of the image file location and the "> to close the tag.
I must have picked up an blank space when I did copy/paste of image location URL!
Here's an example of a properly formatted image tag with some additional image properties:
<img src="https://theme.zdassets.com/theme_assets/your_image.png" alt="contact support button" width="100" height="100">
This is also not working for me. I uploaded the image as a png to assets like it showed in your guide. I have tried a multitude of ways to get this image to shown in my automations but it wont. I use this technique. What am I doing wrong?
Silas Johnson It looks like you're using some kind of placeholder in the image source? That looks like what you'd find under "Template" in the asset's properties in the theme editor.
I'm not sure if that should work but what I know worked for me is using the direct path to the asset that I uploaded.
To get the full URL path to your image asset: Right click on the image from the theme editor and select "Copy Image Address". When you paste it you should see something like this: https://theme.zdassets.com/theme_assets/12345678/123456789abc123456789def.png
Then take that URL and use it as your image source:
<img src="https://theme.zdassets.com/theme_assets/12345678/123456789abc123456789def.png" alt="description of image" width="100" height="100">
You might find it's helpful to include the width and height properties also. You can do a little trial and error to get those right. For easier experimentation you can put this all into a trigger rather than automation and once you know it is working and looks good put it into your automation.
I tried what you said, but it doesn't work still. It doesn't hide the html tag, it just simply prints it in the comment box
Maybe its because I didn't do it in a trigger?
Silas Johnson To troubleshoot, I'd say first try to get it working in a trigger. I'm assuming you're trying to insert this image into the email message body, right? Try putting the image tag into the email body and setup the trigger so that it will only fire on a ticket that you update. I had a problem with a wayward space in my image tag, so it could be something like that.
In the automation, I'm not sure if you need to put it into valid HTML. That's the only way I am using images in email body from an automation as part of my CSAT survey. You could try adding the <html> <head> and <body> tags and all of that to make it valid HTML. Not really sure though without trying it out myself. Good luck!
Thanks again! i'll keep playing with it. I got it to send with a trigger, but image is broken
Having the same issue here and I keep getting that this is related to the image download setting in Outlook and Gmail. I spoke with our Marketing team, who sends comms with images all the time and they've reported that they're aware some end users won't have images on auto-download but they're comfortable with it.
The difference though is that I want to make these updates to the global email channel template - but this article is written about using images in triggers. Do the same practices above apply?
The same should also apply since it will be up to the user's end how they will handle the image. How their client handles the images will depend on their system settings, restrictions, etc.
Hope this helps.
Please sign in to leave a comment.