Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code. Please post any issues you have in the comments section or try searching for a solution online.
Question
How do I add a hyperlink to a trigger?
Answer
To add hyperlinks to notifications sent using triggers or automations, you must use HTML. To add a hyperlink, you would use the following HTML:
<a href="link URL">text</a>
For more information on using HTML for formatting, see Where can I use Markdown and HTML in Zendesk Support?
27 Comments
This links you back to the ticket. How do I get the hyperlink to take me to an external source such as a website?
Hi Emily,
Thanks for reaching out!
Try something like the following to hyperlink to an external site in your trigger:
<a href="url">link text</a>
Hope this helps! Have a great rest of your day!
What would I put for the link text? Is that the same text as the URL?
Hi Emily!
That would be the text you want hyperlinked!
i.e.
<a href="www....com">here</a>
That would display as, "For more information, please click here.", with that word "here" being the text that is hyperlinked.
How do you hyperlink using placeholders? For example, will the following work or am I expecting too much?
<a href="{{ticket.url}}">{{ticket.title}}</a>
Hey Ben!
I tested it and that works, but you'll need to replace {{ticket.url}} with {{ticket.link}}, which is the correct placeholder for the URL that goes right to the ticket.
Any clue why this does not work for me? I get this if I apply it the suggested way:
What is wrong?
Hi Boris!
Just to clarify, is it rendering in the ticket that way after you submit it? Or is your screencap from before you submit the ticket?
HTML code doesn't appear to work with CHAT triggers. The document https://support.zendesk.com/hc/en-us/articles/224594167-Where-can-I-use-Markdown-and-HTML-in-Zendesk-Support- lists triggers as a valid use of Triggers, but doesn't specific ticket triggers.
I tried using this method in a trigger. I wanted it to say 'visit our support center if you're having a fit issue' and have 'fit issue' be a hyperlink. Instead, the message doesn't display as soon as the '<' is there, so the test says '.. if you're having a' and then nothing at all. Any advice?
Thanks!
Hi Admin,
Are you trying to use this in the body of a notification on a ticket, or are you trying to use this in a Chat trigger?
Hi Nicole
In body of a ticket notification, which is filled in when I select one of my macros. Thanks!
Fiona
Hi Admin,
Any chance you can provide us with the exact code you're using so we can take a look for you? Or possibly a screenshot of the trigger you've set up? Particularly the email body.
Thanks!
Hi Brett
I used the code provided in this article. Here's a screenshot (I replaced our company info with ** for this screenshot)
Thanks!
Fiona
Hi Fiona,
It looks like you're missing the second quotation mark at the end of your URL. Can you try adding that and see if that resolves the issue?
Let me know!
Thanks, Brett, for catching that! Now that I've corrected it, it's working! Thanks!
Fiona
Happy to help Fiona :)
Hello! I hope this helps :)
How to add this link to chat trigger, provided code ( <a href="linkURL">text</a> ) doesn't work in app.
Hey Tiago,
I double-checked on my end and it looks like hyperlinks will not work in Chat triggers at this time. You'll need to post the actual URL link in your trigger for the user to click on.
Let me know if you have any other questions for me.
Cheers!
Thanks for the reply Brett!
Try leaving only one URL but in apps (iOS and Android) the click does not work.
Hey Tiago,
We just did some testing and it looks like if you're just pasting the URL it should show up as a clickable link in iOS or Android. Hyperlinks would not show up as a clickable link, however.
Are you able to replicate this on a different device? Any chance you can provide a screenshot of what you see on your end from your mobile device?
Follows the print of how it looks, even being a URL I can't click.
It looks like a picture, I can't touch or copy the text
Thank you again
Thanks for the update Tiago!
I'm going to bring this into a ticket so our Customer Advocacy team can dig into this further.
You'll receive a follow-up email shortly stating your ticket has been created.
Cheers!
I want to add hyperlinks in my trigger responses. have tried everything in this feed but nothing has worked. The text appears bu the hyperlinks o not. I have contacted support and the latest recommendation is to add a hash at the beginning of the link like this #{{ticket.id}} but this still does not work.
Any other recommendations?
Hi Therese Connor -
I see that this is your first post. Welcome to the Zendesk Community!
In order to insert hyperlinks into the messages posted by a trigger, you'll need to use HTML. Here's an example:
<a href="{{ticket.id}}"</a>
There's additional information in this community conversation: Links in trigger responses
Has this been fixed? We are waiting years for this already! Common!!!
Please sign in to leave a comment.