Question
How can I add images to the body of email notifications sent by triggers or automations? There doesn't seem to be any button to attach files or add inline images?
Answer
Currently, there is no native "add inline image" option when editing the body of email notifications sent by triggers or automations. However, it is possible to include images in those notifications by using HTML.
You can use HTML to reference an image's location and have the email body display the image itself, rather than the image's URL or file path. We use an image tag to include the image in the email body, which looks like this: <img src="image_url">. Your image needs to be hosted online in order for it to be used as part of the image tag. If you don't have somewhere to host the image file, you can upload it as an asset in your help center. You can see an example of how to use HTML to include an image in the body of a trigger notification below.
1. Find the image you want to include in the email body and get the direct URL for that image.
We are going to use the image below which has this direct URL: https://d1eipm3vz40hy0.cloudfront.net/images/social/twitter-zendesk.jpg
2. In the email body within the Trigger creation page, you will need to include the HTML image tag we mentioned above, substituting the image's direct URL where it says "image_url".
3. Test your trigger to make sure everything looks correct. You can do this by setting the trigger conditions so they only fire on your test ticket (e.g., "Tags > Contains at least one of the following > TestForHTML") and then checking the email notification you receive.
You can also use HTML to do things like resize the image so that it looks more in-line with the rest of the email, and there are some great online tutorials for learning how to use HTML, like w3schools.
13 Comments
Hi Brett,
Hmm, that's strange that it works for you. The setting Rich content in email is enabled for us, so that's not what's causing the problem.
Hi Brett,
I have replied to the email.
Sounds good Karen :)
We will continue working with you on that ticket!
Hello Julonda,
So this is indeed possible with the base product and no custom code needed. I've gone ahead and linked a how-to guide on adding this image into a signature like feature via trigger. Let me know if this helps and if there is anything else we can do to assist you.
Hi Brett,
It looks like this:
In the email, the image appears like this:
I have opened a ticket with Zendesk support, and will share any info that they provide.
We recently changed our company logo.
I modified all triggers with the logo:
<img src = "https://motify.nl/wp-content/uploads/2020/04/Logo-Motify-2020-200x66.png">
The new logo is now shown in the email of 1 trigger,
namely trigger:
"Notify applicant and CCs of application received"
(dutch: "Aanvrager en cc's op de hoogte brengen van ontvangen aanvraag")
The other triggers still show the old logo, from the old url
How do I get the other triggers with the correct logo?
Greeting,
Dirk
This is also not working for me. It appears like this in the email:
Perhaps this solution worked once, but it's not working now. I tried it with the URL given above, which does work if navigated to directly, and with https://docs.microsoft.com/en-us/azure/bot-service/media/how-it-works/architecture-resize.png.
hello! in my case I've tried with so many images, but in my hotmail as a customer I see this:
I got a reply from Zendesk support, and it turned out that my email client (Outlook) was blocking the download of pictures. I hadn't noticed the message at the top of the email about picture download! I added the support email address to the safe senders list, and then the images appeared! The images also appeared for web Outlook on Chrome. I also tested with other email clients and browsers: For Yahoo, in IE I had to enable remote image download but in Firefox the images were shown by default.
Hey Karen,
It looks like there may be an issue on the back-end that is causing these images to not render on your account. It looks like one of our agents replied to your existing ticket for some additional information. I recommend replying to that email so Eric can assist you further with this issue.
Cheers!
I am trying to add an Logo to a trigger we have and it is not working. I tried using using the direct URL and also tried by adding the image as a asset to the help center. Neither one is working. What can I try next?
Hey Karen,
I did some testing on my end and this code worked fine for me. Can you navigate to Admin>Channels>Email and confirm Rich Content in Email is enabled?
I'm wondering if that's what's breaking the image that going out to the requester.
Let me know if that's not the case.
Thanks!
Hey Karen,
Can you provide me with a screenshot of the trigger action you've set up to include the image?
I may be able to assist further if I have a good idea of what this trigger looks like.
Thanks in advance!
Please sign in to leave a comment.