Automation basics
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?
After you add a branch, you’ll always be prompted to add a condition or an action next. (You can’t add another branch because branches don’t nest.)
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.
Each branch accepts specific smart values, which are noted below each entry.
Smart values are dynamic variables that can make your rule more flexible. Each smart value is constructed using a specific syntax called dot notation inside double mustache brackets. It's written as a hierarchy, starting with a top-level object and followed by properties of that object, {{object.property.subProperty}}. Notice that multiword properties use camelCase capitalization.
In Confluence automation, some branches are built in a “For each” [object] format.
A For each ____ branch applies the condition and/or action that follows it, for each object that meets the criteria you set.
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 1,000 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.
A Page branch applies the same condition and/or action on up to 1,000 pages that meet the criteria you set.
The page branch doesn’t include blog posts, whiteboards, or databases. To create a custom branch for another content type, use a related entities branch and select a type.
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.
A Page branch 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).
Smart values:
{{content}}
{{page}}
{{pagesPerOwner}}
{{pagesPerAuthor}}
{{isBranch}}
A For each inactive page branch executes a condition or action on 1,000 pages that align with the criteria you select. An inactive page is any page that has not been viewed in the specified time period. The view history includes updates and comments made to the page.
The criteria you can set includes:
The past number of days, weeks, or months.
Smart values:
{{content}}
{{page}}
{{isBranch}}
{{inactivePages}}
{{inactivePagesPerOwner}}
{{inactivePagesPerAuthor}}
A For each page owned by a deactivated account branch executes a condition or action on 1,000 pages owned by someone who no longer has Confluence access.
When you use this branch, you must choose a space.
Smart values:
{{content}}
{{page}}
{{deactivatedOwnerPages}}
Guest users are accounts with access to a single space. They do not count against your total number of paid licenses.
Smart values:
{{user}}
{{unasignedGuestUsers}}
Tasks are action items that may or may not have been assigned to a person or team by mentioning them.
A task branch applies the same condition and/or action on up to 1,000 tasks that meet the criteria you set.
A 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.
A task branch 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.
Smart values:
{{task}}
{{isBranch}}
{{page}} *
{{blogpost}} *
{{content}}
{{space}}
{{tasksPerAssignee}}
*- The presence of these smart values is dependent on whether it is a branch for a page or blog post.
This component clears content and space smart values before branching. See Smart values in Confluence automation for more on smart values.
CQL stands for Confluence Querying Language and, like JQL and IQL in Jira, can be used to conduct advanced searches in Confluence.
A related entities branch applies the same condition or action on up to 1,000 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.
Smart values:
{{isBranch}}
{{cqlResult}}
{{cqlResult.id}}
{{cqlResult.state}}
{{cqlResult.title}}
{{cqlResult.type}}{{page}} *
{{cqlResults}}
{{blogpost}} *
{{content}} *
{{whiteboard}} *
{{database}}*
{{smartlink}} *
{{comment}} *
{{attachment}} *
{{space}} *
*- The presence of these smart values is dependent on whether the branch is from a page, blog post, comment, attachment, or space.
This component clears content and space smart values before branching. See Smart values in Confluence automation for more on smart values.
A simple query in CQL (also known as a 'clause') consists of a field, followed by an operator, followed by one or more values or functions.
For example, the following simple query will find all content in the "TEST" space. It uses the Space field, the EQUALS operator, and a text value term ("Test".) CQL terms are not case sensitive.
1
space = "TEST"
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.
…that contains the same term (or phrase) in the title
1
title ~ "meeting minutes"
…that uses the same Confluence macro
1
type = Page AND macro = cqlnavigation
…that was created in the last month
1
type = blogpost AND created > startOfMonth("-1M") AND created < startOfMonth()
…that was created by a specific user (by account ID)
1
type = smartlink AND creator = "99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e"
…that you (as a specific user) wrote in the past week
1
type = comment AND creator = currentUser() AND created > startOfDay("-1w") order by created desc
…that contains the same term (or phrase) in its name
1
type = Attachment AND title ~ "screenshot"
…that’s a PDF containing a certain term (or phrase)
1
type = attachment AND title ~ "pdf" AND text ~ "confluence"
These branches allow you to connect Confluence automation and Jira, so that a rule triggered in Confluence can apply conditions and actions to existing Jira issues.
Jira branches are available in both space and global automation.
Jira branches require a connection. Connecting your automation rule to your Jira instance is kind of like when you give a social media app permission to access your photos.
You’ll be prompted to connect them when you select a Jira branch in the rule builder.
Jira branches can perform actions on up to 1,000 issues at a time. If the limit is reached, the rule will stop running even if there are more issues that meet the rule’s criteria. This helps to maintain performance.
You can read about additional automation limits, here.
JQL stands for Jira Querying Language, and like CQL in Confluence, it can be used to conduct advanced searches in Jira products.
A related issues branch applies the same condition or action on up to 1000 issues as defined by your query. This is a way to create a custom Jira issue branch using any criteria you want.
Read more about how to construct JQL queries.
For more information about Jira branching, see Branch automation rules to perform actions on related issues.
Confluence doesn’t have any general branch components.
A general branch is a branch that can be used in automation rules that work across all Atlassian products.
Was this helpful?