Last active
March 7, 2019 20:55
-
-
Save armstrjare/110d1d72e954626dfe39 to your computer and use it in GitHub Desktop.
Zendesk Regular Email Formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% capture newline %} | |
{% endcapture %}{% capture htmlemail %}{{ ticket.latest_comment_formatted | split:"<table" | size }}{% endcapture %}{% if htmlemail == '1' %}{{ ticket.latest_comment.value }} | |
{% else %}{{ ticket.latest_comment.formatted_value }}{% endif %} | |
{% for attachment in ticket.latest_comment.attachments %} | |
Attachment: {{attachment.filename}} {{attachment.url}} | |
{% endfor %} | |
{% if htmlemail == '1' %} | |
{% for comment in ticket.public_comments %}{% if forloop.index > 1 %}{% capture preline_prefix %} | |
{% for i in (3..forloop.index) %}>{% endfor %}{% if forloop.index > 2%} {% endif %}{% endcapture %}{{ preline_prefix }}On {{ comment.created_at_with_time | date:'%a, %B %-d, %Y at %-I:%M %p' }}, {{ comment.author.name }} <{{ comment.author.email }}> wrote:{{ preline_prefix }}{% capture line_prefix %} | |
{% for i in (2..forloop.index) %}>{% endfor %} {% endcapture %}{{ line_prefix }}{{ comment.value | split:newline | join:line_prefix }}{{ line_prefix }}{% endif %}{% endfor %} | |
{% else %} | |
{% for comment in ticket.public_comments %}{% if forloop.index > 1 %} | |
<div> | |
On {{ comment.created_at_with_time | date:'%a, %B %-d, %Y at %-I:%M %p' }}, {{ comment.author.name }} <{{ comment.author.email }}> wrote: | |
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">{{ comment.formatted_value }} | |
{% endif %}{% endfor %} | |
{% for comment in ticket.comments %}{% if forloop.index > 1 %}</blockquote></div>{% endif %}{% endfor %} | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% capture newline %} | |
{% endcapture %}{% capture htmlemail %}{{ ticket.latest_comment_formatted | split:"<table" | size }}{% endcapture %}{% if htmlemail == '1' %}{{ ticket.latest_comment.value }} | |
{% else %}{{ ticket.latest_comment.formatted_value }} | |
{% endif %} | |
{% for attachment in ticket.latest_comment.attachments %} | |
Attachment: {{attachment.filename}} {{attachment.url}} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div dir="ltr"> | |
<div style="color: #b5b5b5;">{{delimiter}}</div> | |
{{content}} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This
Trigger
template for Zendesk renders the ticket responses as a stock-standard email (except for the delimiter). Includes a properly formatted plaintext version, and blockquote nested HTML version.Make sure you remove the formatting from the main email template too (mine is attached).
As you can tell, there are egregious levels of hax required to determine various things. Probably various little improvements to make in the template, feel free to suggestion improvements (or any issues).
To configure
EmailTemplate
to the slimmed down version.Notify requester of comment update
trigger and assign the template attached.Gmail screenshots
Text Version
http://monosnap.com/image/yIjaMzBsSDeDuoY3Z3C9fL2EVKg8Wy
HTML Version
http://monosnap.com/image/wILiKahLk37SA2kMu29s1mkDNoNgYE