How to automate page rendering in Confluence


How to publish SQL queries to Atlassian Cloud provides a Confluence page based solution to publish content. Now, we want to totally automate the process using Bamboo!

This same approach applies to those that need to automate the rendering of pages that use the Cache Macro and are applying the techniques outlined in Page display performance tips and techniques to provide their users with a good user experience accessing pages that are performance intensive.


  1. A Bamboo instance installed and running. Either you are already a Bamboo user or a starter instance can be installed in a few minutes for $10 license fee. 
  2. Install the Run CLI Actions in Bamboo.


  1. Create a new build to run your automation.
  2. Add a Confluence CLI task - search for cli in the task browser, if necessary.
  3. Configure the task similar to the example shown.
  4. Schedule the build to run based on your specific requirements for the currency of the resulting page(s).

Use a Bamboo variable for your Confluence server information

 A CLI action requires server and login information to access the remote Confluence server. Use a global Bamboo variable to provide this information so that it can be available to multiple tasks and builds and be maintained easily.

Script body
# Render the page and throw away the data (--file "")
--action run --common "-a renderRequest --space dev --file """" " ${bamboo.confluenceCli}

--title "Example - Project Summary" --requestParameters "profile=confluence-Cloud&run_1=run"
--title "some other page" 

Simplification for just running a single action

The example is constructed to easily expand to running multiple page updates from a single task. The action can be simplified to a single page rendering like so:

--action renderRequest --space dev --title "Example - Project Summary Page" --requestParameters profile=confluence-Cloud&run_1=run --file "" ${bamboo.confluenceCli}