Send last attachments email

João Cunha January 20, 2025

Hi all

I'm trying to create an automation that, when a ticket transitions to a specific state, users have to fill in a mandatory text field that allows them to attach files.

When transiting, this automation via webhook will check if any attachments were added in the last 1 minute.

If so, I want to add the URL of each file to a text field but it turns out that it is only registering the last attachment.

In advanced branching is it possible to concatenate all results into one variable?

In the logs everything appears on a single line, but in the ticket, only the last result is recorded

image.pngimage.pngimage.pngimage.pngimage.png

Thank you!

2 answers

0 votes
Gerusa Lobo _e-Core_
Atlassian Partner
January 20, 2025

Hi João,

"In advanced branching is it possible to concatenate all results into one variable?"

I didn't find how edit a variable in automation. 

And I think it is your root cause problem. Because that, the variable was updated in each row of the loop and you have only the last attachment, 

But, maybe, you could use a post-function in a workflow transition, to set this field.

I make something similar a month ago, using script.

The post function get the new attachments ID's and update the list on field.

0 votes
Gerusa Lobo _e-Core_
Atlassian Partner
January 20, 2025

Hi João,

Maybe the best solution will be create a screen in this transition, that have the text field and the attachment field, with a required fields validators.

If it is necessary, maybe a behavior could be used to hide or present a field, based on another fields content.

I hope that it could be help you.

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events