When a user posts a comment with an attachment, I would like to use Jira Automation to extract the attachment and send it to the customer's Topdesk instance via REST or Email.
I can get the text just fine, but have been unable to get the attachment from the comment.
Context: Sync between Jira and Topdesk issues.
Hi @Bernhard Mostrey -- Welcome to the Atlassian Community!
For a question like this, context is important for the community to help. Please post the following:
* an image of your complete automation rule,
* images of any relevant actions / conditions / branches,
* an image of the audit log details showing the rule execution, and
* explain what is not working as expected.
Until we see those...
The scenario you describe is challenging for several reasons, including:
Again, please check the marketplace for solutions for #1 above.
A potential workaround for #2 is to get the attachment's URL by checking the created date / time of the attachment within a threshold of time, and then sending that URL in the email.
For example, this expression will return any attachments added within the last 5 seconds (and so likely when the comment was added). Please adjust the 5 second threshold to meet your needs.
{{#issue.attachment}} {{#if(created.diff(now).seconds.lt(5))}}{{content}} -- {{filename}}; {{/}} {{/}}
How that works:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.