Understand the general concepts and best practices of automation in Atlassian cloud products.
Automation is an admin feature available in Confluence Premium and Enterprise.
Branches are optional components that expand the execution of your rule. When a branch is added, the rule no longer executes in a linear fashion, but instead expands to multiple paths (with the potential to perform multiple actions).
You can learn more about this component type by reading What is rule branching?
The condition and/or action you add will only apply to this branch of the rule chain.
The If/else block condition isn’t compatible with branch components.
This is because they serve opposing functions: An If/else block condition runs either one path or the other, where as branching runs multiple paths at once.
You therefore won’t see If/else block as an option when you add a condition component to a branch.
In Confluence automation, a branch is always some form of “For each” [object].
For example, you can apply the same action for each task (the object) that is due in 3 days (the criteria you set).
Confluence branches can perform actions on up to 150 pages, tasks, etc at a time. If the limit is reached, the rule will stop running even if there are more items that meet the rule’s criteria. This helps to maintain performance.
You can read about additional automation limits, here.
For each page
A For each page branch applies the same condition and/or action on up to 150 pages that meet the criteria you set.
The For each page branch doesn’t include blog posts. To create a custom branch for blogs, use a For each related entities branch where type = blogpost.
The criteria you can set includes:
Author: Who originally published the page.
Date published: When the page was originally published.
Date updated: When the page was most recently edited.
For each page will default to the Author criteria module. Select the X to remove it. Select Add more criteria to add different (or additional) criteria including the date published (created) or updated (edited).
For each task
Tasks are action items that may or may not have been assigned to a person or team by mentioning them.
A For each task branch applies the same condition and/or action on up to 150 tasks that meet the criteria you set.
A For each task branch will look at all tasks in the associated space (Space automation) or spaces (Global automation).
For this reason, it’s commonly used to run space-level task audits in combination with the Scheduled trigger – as demonstrated in the rule template, Remind teammates of incomplete tasks when scheduled.
The criteria you can set includes:
Assignee: Who the task is assigned to.
Due date: When the due date is (and whether it has passed).
Status: Whether the status of the task is complete or incomplete.
For each task will default to the Status criteria module. Select the X to remove it. Select Add more criteria to add different (or additional) criteria including Assignee or Due date.
For each CQL result (related entities)
CQL stands for Confluence Querying Language and, like JQL and IQL in Jira, can be used to conduct advanced searches in Confluence.
A For each related entities branch applies the same condition or action on up to 150 of the same object as defined by your query.
This is a way to create a custom “For each” branch using the object you want.
Create custom queries
You can join two or more clauses with keywords (like OR, AND) to form a more complex CQL query.
Below are some examples of common CQL queries to provide contextual starting points for different objects. To learn more about how to construct your own queries, see Advanced searching using CQL.
Query examples (by object type)
For each page…
…that contains the same term (or phrase) in the title
…that uses the same Confluence macro
For each blog post…
…that was created in the last month
For each comment…
…that you (as a specific user) wrote in the past week
For each attachment…
…that contains the same term (or phrase) in its name
…that’s a PDF containing a certain term (or phrase)
Confluence doesn’t have any general branch components in common with other products.
Was this helpful?