Using Automation to Create Pages With Snapshots

Some use cases require the automatic creation of Confluence pages with Snapshots, including the automatic population of the data from Jira.

For example, if weekly status report pages are to be created automatically.

There is now a simpler way to do the last step. Take Snapshots on a Confluence page is a Snapshots action for Jira automation that replaces the Send web request step described below. It needs only the content ID of the page and the global API key, with no URL and no headers to configure. Use it if you are building your rule in Jira.

The web request is still the route for Confluence automation, and for any other tool, because the action is currently available only in Jira automation.

Basics

To implement the use case, we'll use several components:

  1. Define a Confluence Template that has the required content of the page, including one or several Snapshot macros. We'll use this template as the easiest way to assign content of a page that is created through Automation.

  2. Enable the Global API Endpoint for Snapshots. See Administering Snapshots automation for how to do this.

  3. Use Jira Automation (or Confluence Automation) to create a new page from the template you defined, and then trigger the snapshots. See details of this Automation rule below.

Jira Automation Example

create-page-automatically (1).jpg


The flow of the rule is like this:

  1. Trigger the rule: In the example, the rule is manually triggered by a user.

  2. Create the new page, using the template as its content.

    image-20250815-091101.png
  1. Log messages: these are optional. They are useful for troubleshooting.

  2. Send a web request:

    1. The Web request URL is: https://snapshots-api.radbeeapps.com/take-snapshot/{{content.id}}

    2. Two headers: jira-snapshots-api-key, and Content-Length

      send-web-request (1).jpg

If you are building the rule in Jira, replace this Send web request step with the Take Snapshots on a Confluence page action. Give it the content ID of the page created by the previous step and the global API key, and it does the same job with nothing else to configure.

A worked example

For a full recipe that keeps the generated report pointed at whichever version your team is working on, see Automating test coverage pages for your current version. It combines this pattern with a snapshots variable, so rolling over to the next version is a single change in one place.