Automation basics
Understand the general concepts and best practices of automation in Atlassian cloud products.
Rules always begin with a trigger component. The trigger is the catalyst that sets your rule in motion.
In Confluence, that might be a product-based event like “when a new page is published”, or it might be a time-based event like “when it’s Tuesday at 10am”.
If you're in Space automation, the rule runs each time the triggering event happens in the space you’re in. If you're in Global automation, it will execute each time the triggering event happens in any space in your Confluence instance — or the spaces you specify.
Each trigger 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.
These triggers are specific to automation for Confluence and can be used to automate a single space (Space automation) or multiple spaces at once (Global automation).
This trigger runs your rule each time a page is archived.
“Page” in this context is a distinct content type from “blog”. Blogs can’t be archived.
Smart values:
{{page}}
{{content}}
{{space}}
This trigger runs your rule each time a page or inline comment is added to a page.
This doesn’t include when an existing comment is edited.
Smart values:
{{page}}
{{content}}
{{space}}
{{comment}}
This trigger runs your rule each time a page that was copied is published.
“Page” in this context is a distinct content type from “blog”. Blogs can’t be copied.
Smart values:
{{page}}
{{content}}
{{space}}
This trigger runs your rule each time a page is deleted, i.e., sent to the trash.
“Page” in this context is a distinct content type from “blog”. A “Blog deleted” trigger does not exist at this time.
Smart values:
{{page}}
{{content}}
{{space}}
This trigger runs your rule each time edits to an existing page are published as an update.
“Page” in this context is a distinct content type from “blog”. A “Blog edited” trigger does not exist at this time.
Smart values:
{{page}}
{{content}}
{{space}}
In its default state, this trigger runs your rule each time any label is added to a page.
You have the option to configure it by selecting specific labels from a dropdown. If you add more than one label, the rule will trigger each time any one of those labels is added.
Smart values:
{{page}}
{{content}}
{{space}}
{{label}}
This trigger runs your rule each time a page is moved.
“Page” in this context is a distinct content type from “blog”. A “Blog moved” trigger does not exist at this time.
Smart values:
{{page}}
{{content}}
{{space}}
This trigger runs your rule each time the ownership of any page is transfered.
The page’s author is the owner by default. But the current page owner, or a space or Confluence product admin, can transfer a page’s ownership to anyone who has permission to edit it. Blog ownership can’t be transferred.
Smart values:
{{page}}
{{content}}
{{space}}
This trigger runs your rule each time a new page is created and published.
This doesn’t include drafts (which aren’t yet published), pages that were copied from another page (see “Page copied” trigger) or subsequent updates when the page is edited (see “Page edited” trigger).
“Page” in this context is a distinct content type from “blog” (see “Blog published” trigger).
Smart values:
{{page}}
{{content}}
{{space}}
This trigger runs your rule each time the content status of a page changes to a status you specify (for example, “ready for review”).
Content statuses are specific to each space. So, if you’re in Global Automation, the trigger can’t provide status selections until you set and save the rule’s Scope (in rule details) to a specific space or spaces. Once the scope is saved, both Suggested and Custom statuses will surface as options.
In order to use this trigger, content statuses must be enabled. Space admins can control them in Space Settings > Manage space.
Smart values:
{{page}}
{{content}}
{{space}}
{{priorContentStatus}}
This trigger runs your rule each time an attachment (for example, an image) is added to a page.
Smart values:
{{page}}
{{content}}
{{space}}
{{attachment}}
This trigger runs your rule each time a page attachment (for example, an image) is deleted, i.e. sent to the trash.
Smart values:
{{page}}
{{content}}
{{space}}
{{attachment}}
This trigger runs your rule when someone adds a selected data classification level to a page or blog. Select from any data classification level available in the organization or use the space’s default classification level.
This trigger runs your rule each time a task is assigned to someone on any page.
You have the option of configuring it by selecting specific users or groups from a dropdown. Otherwise the rule will be triggered any time a task is assigned to anyone. Tasks are assigned by mentioning someone in an action item.
Smart values:
{{page}} *
{{blogpost}} *
{{content}}
{{space}}
{{task}}
*- The presence of these smart values is dependent on whether it was triggered from a page or blog post.
This trigger runs your rule each time the status of a task on any page changes.
You have the option of configuring it by specifying the status as Complete (i.e. checked) or Incomplete (ie. unchecked) in a dropdown. Otherwise the rule will be triggered any time a task on a page is checked or unchecked.
Smart values:
{{page}} *
{{blogpost}} *
{{content}}
{{space}}
{{task}}
*- The presence of these smart values is dependent on whether it was triggered from a page or blog post.
This trigger runs your rule each time an inline or page comment is added to a blog post.
This doesn’t include when an existing comment is edited.
Smart values:
{{blogpost}}
{{content}}
{{space}}
{{comment}}
In its default state, this trigger runs your rule each time any label is added to a blog post.
You have the option to configure it by selecting specific labels from a dropdown. If you add more than one label, the rule will trigger each time any one of those labels are added.
Smart values:
{{blogpost}}
{{content}}
{{space}}
{{label}}
This trigger runs your rule each time a new blog post is published.
This doesn’t include drafts (which aren’t yet published) or subsequent updates when the blog is edited. A “Blog edited” trigger does not exist at this time.
Smart values:
{{blogpost}}
{{content}}
{{space}}
This trigger runs your rule each time an attachment (for example, an image) is added to a blog.
Smart values:
{{blogpost}}
{{content}}
{{space}}
{{attachment}}
This trigger runs your rule each time a blog attachment (for example, an image) is deleted, i.e. sent to the trash.
Smart values:
{{blogpost}}
{{content}}
{{space}}
{{attachment}}
This trigger runs your rule each time a new whiteboard is created.
This doesn’t include whiteboards that were copied or subsequent updates when the whiteboard is edited. Unlike pages, whiteboards do not have a “publish” action, so this is triggered immediately on creation of the whiteboard.
This trigger runs your rule each time a new database is created.
This doesn’t include databases that were copied or subsequent updates when the database is edited. Unlike pages, databases do not have a “publish” action, so this is triggered immediately upon creation of the database.
Smart values:
{{database}}
{{space}}
This trigger runs your rule each time a new smart link is added to the content tree.
Smart values:
{{smartlink}}
This trigger runs your rule each time a smart link in the content tree is edited.
Smart values:
{{smartlink}}
This trigger runs each time a user is added to a specified group.
Smart values:
{{userAdded}}
{{group}}
In its default state, this trigger runs your rule if any user or group is mentioned on a page or blog post (including in a comment).
You have the option to configure it by selecting specific users and/or groups from a dropdown. If you add more than one, the rule will trigger each time any of your selections are mentioned.
Smart values:
{{page}} *
{{blogpost}} *
{{content}}
{{space}}
{{user}}
{{comment}} *
*- The presence of these smart values is dependent on whether it was triggered from a page, blog post, or comment.
(Global automation only)
This trigger runs your rule each time a space is archived.
Smart value:
{{space}}
This trigger runs your rule each time a new space is created.
Smart value:
{{space}}
Users can create smart buttons on any page to manually trigger rules.
This trigger runs your rule when a person selects it from the automation menu (lightning bolt icon) at the top of a published page.
The automation menu isn’t available on blogs.
In its default state, this trigger allows anyone with space access to see and run your rule from the automation menu. This isn’t necessarily limited to administrators, allowing teammates to easily automate actions on a page.
To limit who can see and run your rule, select specific users and/or groups from the trigger’s dropdown.
If the user will need to configure parts of the rule themselves before they run it, check the “Prompt for input” box and add text fields, checkboxes, etc.
Manual triggers can also be used to test and debug rules.
Learn more about using the Manual trigger to test rules
Smart values:
{{page}}
{{content}}
{{space}}
If you’ve used automation for Jira, you’ll recognize some of the same general triggers like Scheduled and Incoming webhook.
This trigger runs your rule at a recurring time that you set.
Use the dropdowns to add Basic configuration, or use cron expressions in the Advanced tab to control nuanced timing down to the second.
Cron expressions are composed of a string of values, separated by spaces, to denote Second, Minute, Hour, Days of the month, Days of the week, Year.
Unlike in Jira, the Scheduled trigger doesn’t support queries in Confluence.
If a scheduled rule fails to execute (serves a Failure status in the automation audit log) 10 times in a row, it automatically disables.
This trigger executes your rule when an HTTP POST is sent to a specified webhook URL.
A webhook is a way for a third party to trigger an automation rule.
When configuring this trigger, you’ll receive a unique URL that you can either add to the third-party application’s outgoing webhook configuration or make an HTTP POST request from your custom scripts.
You can use the {{webhookData}} smart value to reference the custom data provided by the webhook in your rule.
This trigger runs your rule whenever a content scanning alert is generated. Guard Detect generates an alert when someone updates a Confluence page containing certain types of sensitive data, such as credentials, financial, or identity data.
To configure this trigger you need to be an Organization admin or Guard Detect admin and your organization must have an Atlassian Guard Premium subscription.
Was this helpful?