I am using the template automation rule "When a task is near due -> send an email reminder". I would like the email to display the tasks underneath the Project name they are associated with. I am able to list the tasks and the project name in the email body using the {{#lookupIssues}} smart value, but I would like it to display as follows:
Project #1:
Task #1
Task #2
Project #2:
Task #1
Task #2

What I have in the screenshot above displays like this in email:

I haven't been able to find any documentation showing you can use distinct with a Project smart value, but I may have just been using the wrong syntax.
Is there any way to do this?