Atlassian Cloud (formerly OnDemand) restricts the ability to install most apps. So how can you still implement concepts likehow to use Confluence for business intelligence and reporting? Or, perhaps you are not allowed to install apps on your own corporate Confluence installation and you would still like to publish SQL or other external data (like Excel data). Now, there is a solution for both of these use cases.
This article discusses this in terms of Cloud, but it applies equally to other restricted environments. While not as dynamic as using the apps directly, it only takes a few more steps to implement and skills and knowledge gained can also be applied in the other context.
This is how theProductspage is produced. Automation publishes the page once a day.
How to let some macros go unrendered to the published page
When macros=true is used in the CLI macro, all embedded macros are rendered. This is how the SQL data is generated. However, you may want some macros to not be rendered and remain in the markup so they get rendered on the target page. In this example, it is the TOC macro. Simply escape the open bracket so the renderer does not render it and double up the opening bracket so the CLI macro removes the extra after it is rendered.
--minor is used on the storePage action to signal a minor update to avoid notifications being sent out - unfortunately, at least some versions of Confluence do not respect this API setting.
Put specific and unique IDs on the SQL macro (example: id=CONF). This prevents generating IDs that are different each time the page is updated. If there are no other changes with the data for the update, the page is not be marked as changed, and so, no notifications are sent out.