How to fetch Attachment in notification?

How to fetch Attachment in notification?
Screenshot 2024-05-23 153607

Same Topic: How to send attached file in notification mail - #2 by OmarJaber

I got the answer
Use this one

{% set attachments = frappe.get_all(‘File’,
filters={‘attached_to_doctype’: doc.doctype,
‘attached_to_name’: doc.name,
‘file_name’: [‘like’, ‘%.pdf’]},
fields=[‘file_url’, ‘file_name’]) %}
{% for attachment in attachments %}
{{ attachment.file_name }}
{% endfor %}

Hi @Rahul7218

Stuck in the same kind of issue