Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation - chaining multiple actions in a single automation

Domonkos Rozsa September 15, 2021

Hello dear Community,

Can you please help me with the following question?

How do I enable the execution of multiple actions in a single automation? I would like to send Slack messages to approvers and would like to avoid having to create a separate automation for every approver.

So my idea was to create an automation, check the approver in already filtered tickets (the ones with the status "Waiting for approval") and go through these in a chain so to say:
image.png

 

The problem here is that the first one gets executed and then the automation ends. I would like that all the comparisons are done.

Can you please enlighten me how this could be done?

 

Thank you in advance!

1 answer

1 accepted

4 votes
Answer accepted
Cat W September 15, 2021

Depending on how the rule is configured and what your log shows, this may not be the entire problem, but the way you have the components set up in that screenshot, it will only ever send the first message, or none.

If everything is on the main trunk of the rule, then as you go down the line, it will check the issue against each condition. If a condition passes, the automation keeps going, but as soon as a condition fails, it stops, and nothing after the failed condition will run.

Assuming you're checking different names in each condition, if the name on the issue matches the name in the condition, it will run the action (send the slack message) and move on to check the next condition. But if the name matched the first condition, it will fail the next condition, which then kills the automation.

The simplest solution for your use case would be to use an If / else block:

image.png

image.png

This way even if a condition fails, the automation will keep going and evaluate the remaining conditions. You can use most of the other conditions within an If / else block, which makes it pretty versatile, and useful for more complex automation rules.

Most of the time an If / else block is going to be the best choice, but if you need to check multiple unrelated conditions that don't fit well into an If / else block, like if you need more than one of the blocks to pass and perform the actions, you can use branches:

image.png

image.png

You'd want to use Branch rule / related issues on the current issue. You can use multiple branches to run parts of the automation that should not interrupt the main process even if a condition fails.

image.png

image.png

Domonkos Rozsa September 20, 2021

Dear Cat W,

Thank you for your help! The branching was the solution for my requirements. 

Like Cat W likes this

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