On this page
Use case
Within the Send email post function you have the possibility to send HTML links in the message as well.
In the following use case we show an approach to send an email to the project lead linking the most recent attachment.
This use case is normally applied after executing a transition, if an attachment was added there. This will then be linked to.
Configuration
Add the Send email post function to the desired workflow transition or create a new transition.
From
Choose the option User in field with the value "Current user" (this is the default value).
To
Select Field containing users and select the field Project lead.
Email content
Subject
Select the parser mode General and enter plain text and optionally use field codes and JWT expression parser functions.
Email format
Choose HTML
Body
Select the parser mode General and enter the following expression:
<p> Hi %{issue.project.leadDisplayName}, </p> <p> Please have a look at the attachment which was provided during the transition: <a href='%{system.baseUrl}/secure/attachment/%{jiraExpression("issue.changelogs.map(i=>i.items).flatten().filter(i=>i.field==\"Attachment\" && i.to != null)[0]?.to")}/%{jiraExpression("issue.changelogs.map(i=>i.items).flatten().filter(i=>i.field==\"Attachment\" && i.toString != null)[0]?.toString")}'>%{jiraExpression("issue.changelogs.map(i=>i.items).flatten().filter(i=>i.field==\"Attachment\" && i.toString != null)[0]?.toString || \"\"")}</a> </p> <p> Cheers </p>
If no attachmant is available for this issue, no link will be created.
Related use cases
BEGINNER ADVANCED INTERMEDIATEUse case JWT feature Workflow function Parser functions Complexity Alert the assignee of an important issue Send email Inform the project manager about an added attachment Send email Send email after transitioning to specific status
If you still have questions, feel free to refer to our support team.