image for site

Include Only Attachment URLs in Zendesk Emails

Discover how to use Liquid markup to include only attachment URLs from public comments in Zendesk email notifications.

How can I include only attachment URLs from public comments in Zendesk emails?

To include only the URLs of attachments from public comments in Zendesk emails, you can modify your Liquid markup to focus solely on attachments. This approach helps you avoid displaying unnecessary comment details.

Here's a sample code snippet to achieve this:

{% for comment in ticket.comments %} {% for attachment in comment.attachments %} {{attachment.url}} {% endfor %} {% endfor %}

This code loops through all comments and their attachments, printing only the URLs of the attachments. It excludes any information about the comments themselves, providing a cleaner output. For more guidance, see theoriginal Zendesk article.


More related questions

How can I customize comment formatting in Zendesk email notifications using Liquid markup?

You can customize comment formatting in Zendesk email notifications using Liquid markup for more control over how comments are presented. By default, Zendesk uses the{{ticket.comments_formatted}}placeholder, but Liquid markup allows you to…

How can I display only the last comment in Zendesk email notifications?

To display only the last comment in Zendesk email notifications, you can use thelimitandoffsetattributes in your Liquid markup. This allows you to control which comments are included in the email. Here's an example of how you can achieve…

How can I change the author name display based on whether they are an agent or end user in Zendesk emails?

To change the author name display based on whether they are an agent or an end user in Zendesk emails, you can use conditional logic in your Liquid markup. This allows you to customize the display name depending on the author's role. Here's an…

How can I format text in Zendesk emails using HTML with Liquid markup?

You can format text in Zendesk emails using HTML within Liquid markup to enhance the visual presentation of your notifications. This allows you to apply styles like bold text or headings directly in your email templates. For example, to bold text…

Interested indeflectingover 70% of your Zendesk support tickets?

Our AI customer support agent is here to help. Trained on all your help docs, installed directly into your Zendesk account, it can be used to automate customer replies for tickets or live chat. Learn more below.
Zendesk logo

Zendesk Support Tickets

Receive new tickets by email or a support form? This integration is for you.
My AskAI integrated within Zendesk to deflect support tickets
Learn about our Zendesk ticket integration
Zendesk logo

Zendesk Messaging (live chat)

Using Zendesk's Messaging widget on your site for live chat? This integration is for you.
My AskAI integrated within Zendesk to deflect customer support live chat conversations
Learn about our Zendesk Messaging integration

Join1,000+ companies reducing their support costs and freeing up support agents for more important work

Vestd company logo — Customer of My AskAI's AI customer support agents
Genesis company logo — Customer of My AskAI's AI customer support agents
Zinc company logo — Customer of My AskAI's AI customer support agents
Customer.io company logo — Customer of My AskAI's AI customer support agents
Zeffy company logo — Customer of My AskAI's AI customer support agents
NHS company logo — Customer of My AskAI's AI customer support agents
Kontakt.io company logo — Customer of My AskAI's AI customer support agents

Reduce support costs.Spend more time on customer success.

Our AI customer support agents are already used by 👇
Companies using AI assistants on their websites