How to specify in the smart value the value of the filename ?

Estelle Decanis December 5, 2022

Hi,
I made an automation that sends an email when the attachments have been modified.

2022-12-05 093957.png


I would like this to be the case only if the filename contains "Situation analysis". Do you have any idea ?

Best regards
Estelle

3 answers

0 votes
Estelle Decanis December 5, 2022

Thanks @Marta Woźniak-Semeniuk and @Patrik Korovsky but if I add an attachment with another filename the mail is still sent.


Maybe by targeting the count (so adding and deleting) of attachments containing "Situation analysis" it would work?

0 votes
Patrik Korovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2022

Hello @Estelle Decanis

Add a new "if block", where the first condition is your attached automation and the second (Advanced compare condition) checks if the Attachment contains "Situation analysis".

Patrik Korovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2022

The automation mentioned is specifically checking against the last uploaded attachment.

To check against all attachments the condition should be:
{{attachment.filename}} contains "Situation analysis"

email.png

Estelle Decanis December 5, 2022

 I think it is necessary to take into account the number

Patrik Korovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2022

Do you mean the compare two values?
The Advanced compare condition is the same as yours.

In the First value you use {{attachment.filename}} and in the Second value you input "Situation analysis"
comparing.png

Estelle Decanis December 5, 2022

@Patrik KorovskyI tried with this new condition but no addition or deletion is taken into account, even with the filename containing "Situation analysis"

 

By deleting the "" the automation is in Success but does not take into account if there has been an addition or deletion of attachments containing "Situation analysis".

Estelle Decanis December 5, 2022

@Patrik Korovsky @Marta Woźniak-Semeniuk I really think you should target if there is a change on the number of attachments containing "Situation analysis". Do you have any idea ?

Patrik Korovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2022

So let me get this straight.

You would like to send out an email only in case the latest added attachment is "Situation analysis"? 

Estelle Decanis December 5, 2022

added or deleted
yes it is

Marta Woźniak-Semeniuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2022

And if we just leave the block that checks if attachment name contains the "Situation analysis"?

Estelle Decanis December 5, 2022

That is to say ?

Patrik Korovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 6, 2022

@Estelle Decanis

Sorry I got lost in your requirements.

I think that what Marta and I have suggested so far would not work because "Situation Analysis" is either always present or not present at all, we set no conditions.

  1. Do you want the email to be sent every time an attachment is added/deleted, and the "Situation Analysis" is still present in the attachment list?
    1. Should this also apply to cases where the "Situation Analysis" attachment is deleted, and no others remain?
  2. Do you want the email to be sent out only when the last added attachment is "Situation Analysis"?
    1. Should the email also be sent if "Situation Analysis" is the one deleted, and no others remain?

Please specify the "added or removed". It would be best if you could outline how you use this attachment in your workflow.
Let me give an example so I better understand your issue, please confirm or expand on the below:

  1. User is adding attachments with various numerals as filenames -> No email is sent
  2. User adds an attachment with "Situation Analysis" as the filename -> Email is sent
  3. The user keeps adding new attachments, but the emails are being sent because the attachments now have "Situation Analysis" -> Here I understand that is your problem. Please let me know if you have another or different request
Estelle Decanis December 7, 2022

@Patrik Korovsky 

This is not exactly the case. Here are the possibilities:

  • User adds attachment with a different name than "Situation Analysis" -> No email is sent.
  • User adds attachment with name "Situation Analysis" -> Email is sent.
  • The user adds an attachment with a name different from "Situation analysis" -> No e-mail is sent.
  • User adds an attachment with the name "Situation analysis" (yes there can be several attachments with this name) -> The e-mail is sent.
  • The user removes an attachment with a name different from "Situation analysis" -> No e-mail is sent.
  • User removes an attachment with the name "Situation Analysis" -> Email is sent.

That's why I think you have to successfully consider the number of attachments. If the number of attachments with the name "Situation analysis" changes (added/removed) then you have to send an e-mail

Like Patrik Korovsky likes this
0 votes
Marta Woźniak-Semeniuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2022

Hi @Estelle Decanis 

How about something like this?

2022-12-05_10-30-15.png

Estelle Decanis December 7, 2022

Hi @Marta Woźniak-Semeniuk 
It doesn't work well. As soon as there is an attachment with the name "Situation Analysis" an email is automatically sent afterwards -> even if the attachment addition or deletion does not concern "Situation Analysis"

Suggest an answer

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

Atlassian Community Events