[COMPLETED] Add a placeholder for formatted comment values -- maybe {{comment.value_formatted}}



  • Official comment
    Mayra Pacheco

    Hi Justin,

    We're releasing the ability to have placeholders and liquid that allow you to set up email replies without the Zendesk styling and that finally render your HTML. Thanks you for your detailed feedback and rallying other members on the community.

    When will it be released

    We'll be releasing this to all accounts tomorrow, November 2nd. 

    What's included


    • ticket.latest_comment_rich
    • ticket.latest_public_comment_rich


    • comment.value_rich

    Learn more about these placeholders by checking out the expanded comment data documentation.

    For instructions on how to achieve a rich text email with no avatar, timestamp, line breaks, etc. check out this post on setting up an unformatted email template.

    What's missing

    We focused on releasing the above placeholders that are most commonly used. We don't yet have the equivalent of:

    • ticket.comments_formatted > ticket.comments_rich
    • ticket.public_comments_formatted > ticket.public_comments_rich


  • Joel Hellman

    I'd like get a comments_formatted object that is exposed to liquid markup, where you can iterate over each comment, as well.

    My use case is that I'd like to use liquid markup to better control which comments are sent out in email notifications. 

    I'd also like to highlight or remove emailing attachments from individual comments.

  • Aron Trimble

    Adding my thumbs up and use case here as well..

    We were previously using custom formatting with liquid to be able to remove some repeated legalese at the bottom of certain emails. This worked really well but we had to sacrifice the use of HTML formatting in emails to accomplish it. I almost started work on a custom markdown interpreter built with liquid but eventually gave up on it due to complexity.

    We have since switched to just using the standard formatted comments array because the recent updates to html emails and wysiswyg editing have made those features more valuable to us than the annoyance of the legalese.

    Would love to have this feature as well!

    Ps, sorry I can't provide a screenshot of the legal text without approval but trust me, it's long, and it has no business being in ticket emails.

  • Andrew J
    Community Moderator

    Hello Justin,  are you trying to allow people to read the messages in their own preferred text format in Outlook?

    The display of text in outlook can be significantly changed by user settings right?

    First thing you could do to make the emails look more similar is to turn on your photo in the Zendesk email :-)

    What do you consider are the significant differences between your Outlook pic and your Zendesk v1b with images?  (because turning images on would affect the Outlook one too)


  • Justin Graves

    @AndrewJ - Thanks for the reply. I appreciate your input as always. I'm trying to have Zendesk notifications (emails) look more similar to Outlook emails.

    What do your mean by "preferred text format". Most users will never mess with the display settings in Outlook itself so I'm not concerned with that.

    As for turning on photos in emails from Zendesk-- that's a whole other battle I think I may never win with our Exchange admins. I'd love to know if anyone has had any success whitelisting Zendesk.com for images embedded in emails but I have been told it is impossible.

    The difference between v1b and Outlook can be seen visually in the comparison below. First there's the big white space at the top of the email. I turned the mail delimiter white but have yet to find a way to reduce the top padding. Then the color of the text in the body-- Outlook shows the most recent message in blue text to set it apart from the other previous emails which are shown in black text. Then there's the topmost horizontal line that exists in the v1b version (it's hard to see in the small images here). It's strange to have a line above the first part of an email message. I think I remember that the only way to make that go away was to remove all horizontal lines between subsequent messages by formatting it white (which we do want since Outlook has grey lines between messages). Lastly, there's stuff not in the screenshot here. In Outlook, you can see who was CCd on the current and previous emails.

  • Andrew J
    Community Moderator

    Yeah - I get you.  

    What about the risk of people commenting on lower parts of the email?  The helpdesk lines are there to explain how it works.  It's NOT just an email... and clients may need to understand that.

    Have you tried using CSS to change the line heights?

  • Nathan C

    Have to +1 this.

    @Andrew Mills - There is always going to be a risk of people commenting on lower part of emails... after all, you can't entirely eliminate user error. 99% of the time people have half a brain to simply click "reply" and type in the head of a new email.

    In that rare case when someone types "Please see my responses below" and typed below the line, you can always open up the original HTML email to see what was typed.

    Depending on how people are using Zendesk, it's important sometimes to make it look like they are receiving a regular email.

    Even right now we are evaluating whether to move forward with Zendesk based on this one feature "Make emails look like emails, not tickets".

    What we want to achieve: 

    Removal of the blank white space, persons name and all the other formatting before the last response.

    Can't use CSS to change formatting all the time:

    This is half true, but it also depends on the email client. Even using the right CSS to manipulate the current formatted elements will produce funky and different results depending on the email client which the email is being opened on.

    How are we doing this right now:

    Like what Justin said above, we are using unformatted comments to make the email look like a real email - downside is you can't have any HTML formatting in that last comment.

    Hope this helps in pushing the feature forward!!! Seems there is a growing requirement to have more control over the email templates.

  • Nathan C

    After a day of testing and playing around, i have an outcome with works on 90% of email clients. I've posted the link below which has all the code for the email templates.


  • Andrew J
    Community Moderator

    Hello Nathan - looks good - it would be great if you would make a tutorial in the community here... or if you like I could do that for you... Let me know. :)

  • Ben Christensen

    This is a big one for us as well. We want the "unformatted" look of email as well, but still support for embedded images, rich text (eg bold, italics, etc) without the impersonal feeling of the ticket.last_comment_formatted default formatting.

    If we could have a comment.value that processes the markdown formatting instead of just exposing it as plain text, that would be ideal.

    Example using comment.value:

  • Kay
    Community Moderator

    Hi Guys,

    When you have turned the rich text editor some of this is actually possible with liquid. The idea behind it is using inline styles so it works across multiple clients.

    It will handle inline images, and append attachments at the bottom.
    Let me know what you think. Please make sure you deactivate the show profile pictures in your channel

    Check out the code.

    Let me know what you think!

  • Torri Burke

    Hey @Kay - RealConnections (NL) 

    That worked perfectly for what I was trying to accomplish except for it stripped my signature. Could you direct me to which part of the code I can add or remove to bring my agent signature back in? Thank you! 

  • Felipe Fernandes

    Hi @Kay - RealConnections (NL)


    I also got the unformatted template to work, thank you. The only issue I'm seeing now is that it still does not feel like an email conversation with the user. Replies from the ZenDesk agent are all present (i.e. public comment history) in every email that is sent to the user. It would be nice if only the most recent comment was sent since these days, most email clients retain a history of all comments, it seems a little redundant to send old comments in every new email. Any suggestions?

  • Kay
    Community Moderator


    I am so sorry for not responding earlier, I had overlooked your message. That is very well possible if you use a different placeholder in your trigger. Just use `ticket.latest_public_comment_formatted` or `ticket.latest_comment_formatted`.


    Your agent signature is not located in this code. You might want to double check your Settings > Agent to see if there is anything there.

  • Elia Schito

    This a big critical issue for us too, and there's no viable workaround either (except by using comments_formatted). Please make this a priority, should be urgent!

  • Casey Lasda

    This feature is really annoying for us as well. Please fix ASAP!

    We want to have the formatting/markdown features and rich content for our agents' emails, but we don't want all that spacing and lines and headers that come default with the preformatted latest_public_comment_formatted.

  • Andreas Schuster
    Community Moderator

    God bless you!

    It's really pathetic that this is not available, customization of Zendesk e-mails is not really possible without that feature.

    Right now I have to stick to stick with the ugly and bulky formatted option or live with the unformatted version, which is horrible when you are using Macros with formatted text.

    How the hell could the Rich-text editor be released, without thinking about such use-cases?

  • Oliver Knigge


    the new placeholder {{comment.value_rich}} does not work for us. We have tested it and it generates blank space in our outgoing e-mails.

    We have used {{comment.value}} until now. 
    We have changed this placeholder in our triggers to {{comment.value_rich}} and changed the comment editor from Markdown to Rich-Editor. Additionally we have activated Rich-Content in e-mails. 

    But after changing the placeholders, we did not see the formatted ticket comments in our outgoing e-mails. The placeholder generates just blank space. 

    Any hints on that issue?


  • Tomas V.L.

    Same issue here :)

  • Mayra Pacheco

    Hi Tomas and Oliver, 

    You were a bit fast for our release. The update was made available to everyone just now. You should be able to have it work if you try again.

  • Oliver Knigge


    it work's now :)

    But we have another bug with a placeholder in our macros now. We are using a placeholder for a custom User drop-down field (gender).

    So in our macros we use the following placeholder: {{ticket.requester.custom_fields.<gender>.title}}

    After changing to the rich-editor, this placeholder doesn't work anymore. Usual placeholders like {{ticket.requester.last_name}} are still working. 

    Maybe this has something to do with the <> marks in the custom field placeholder?

    Note: If the macro is still available in a "text-only" version without a rich-content version, the placeholder is still working. But if you create a new macro now you have to use rich-content and you can additionally add a text-only version. But once you are using rich in a macro, the placeholder does not work anymore. 

    Greetings :)

  • Andrew

    @mayra it would still be great to see a rich placeholder option that allows for the whole thread. I have set it up myself using liquid, but it doesn't look exactly the same as a normal email thread.


Post is closed for comments.

Powered by Zendesk