Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an IF/Else block with Rovo Agent in automation rules.

Andrew Allen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 16, 2025

I am trying to build out an automation rule that incorporates a rovo agent. I am struggling to get the logic down behind it. 

 

2 answers

1 vote
Tomislav Tobijas
Community Champion
December 17, 2025

Hey @Andrew Allen ,

Could you maybe share what the use case is here? Like, what's the requirement you're trying to solve by using Rovo and automation?

On top of what Alexander said, you could try building and using agent scenarios. By adding scenarios to your agent, you could tailor its responses for different triggers or situations.

But generally, as previously stated, if you use the agent's response (saved to a variable) in your If/Else block, that should be sufficient.

Cheers,
Tobi

Andrew Allen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 17, 2025

I actually want to use the ai agent to search for common patterns associated with leaked secrets. so would need to check on publish (which is easy enough) and edit. I would tag it with a label but would also need to remove the label if the page was remediated.

Its kind of some advanced logic that I can't wrap my head around or even know if its capable.

Like Tomislav Tobijas likes this
Tomislav Tobijas
Community Champion
December 19, 2025

Ah, got it @Andrew Allen 
Interesting one for sure 🤔

What you could try is this - create an automation rule with something like this:

  • Trigger: Set your automation to run on both publish and edit events.

  • Action: Use the "Use Rovo agent" action, prompting the agent to analyze the page for leaked secrets.

  • Decision Logic: Add an If/Else block to check the agent’s response (e.g., does it mention a secret was found?).

    • If a secret is detected, add a label (e.g., "leaked-secret").

    • If the page is remediated (no secret detected), remove the label.

  • You’ll need to craft your agent’s instructions and scenarios carefully so its responses are consistent and easy to parse in automation conditions

Now the thing here is that Rovo agents in automation cannot use their own "skills" (like directly editing a page or managing labels) > all actions need to be handled by the automation rule itself.

Now, if you need to confirm Rovo agent actions in automations, there's an open feature request for it here: ROVO-261: Enable Rovo Agents actions with confirmations through Automation rules 

As this is all relatively new, I guess the best bet would be to use the 'Experiment and adapt' method and see what works and what does not. I haven't tried to build something like this myself, so I cannot say if this is actually possible or not.

1 vote
Alexander Nilsson
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 Champions.
December 16, 2025

Hi Andrew,

thanks for your interesting question. 

The most reliable way to use a Rovo Agent response within an If/Else block is to have the agent return a simple, predictable keyword. Saving this response to a variable before the condition makes the logic more stable.

Recommended Pattern

  1. Action: Use Rovo Agent
    In your prompt, instruct the agent to reply with a single keyword. For example: "If this is urgent, reply only with the word 'URGENT'. Otherwise, reply 'NORMAL'."
  2. Action: Create variable
    Save the agent's output. Set a variable like agentDecision to the smart value {{agentResponse}}.
  3. Condition: If/Else Block
    Use an "Advanced Compare Condition" to check if {{agentDecision}} contains your keyword (e.g., `URGENT`). This is generally safer than checking for an exact match.

Official Documentation

Hope this helps get your logic working!

Please feel free to mark that answer as accepted so that other people can find it more easily. 

Greetings,
Alex

Suggest an answer

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

Atlassian Community Events