Bulk Create a Confluence Page Hierarchy

A new space often starts as a tree drawn in a spreadsheet. Here is how to turn it into real pages with the parents in the right place.

The ordering problem

Every Confluence page except a space root has a parent, and the parent must exist before the child can be created under it. When a page tree is planned in a spreadsheet, the rows are rarely in parent-first order, and some rows hang under pages that already exist in the space.

Creating pages by hand in the right order is slow. A script has to sort the rows into a tree, find existing parents by title, and stop rows whose parent is missing from becoming orphans at the space root.

Describe the tree in two columns

  • Title: the page title, unique within its parent.
  • Parent title: the title of another row in the file, or of a page that already exists under the chosen parent. Leave it empty for top-level pages.
  • Optional Labels: labels separated by commas or spaces, so the new tree is easy to find and filter later.

Steps

  1. Fill in the Title and Parent title columns, one row per page.
  2. Pick the space and the page the tree should sit under, or the space root.
  3. Run a dry run. Rows whose parent title matches nothing are reported as errors, so fix those first.
  4. Create the pages. Parents are created before their children, whatever the order of the rows in the file.
  5. Check the per-row result report and open the top of the new tree in Confluence.

For the basics of templates and placeholders, see creating Confluence pages from an Excel spreadsheet.

Build the tree in one run

Bulk Page Creator for Confluence resolves Parent title references against the file and the space, creates parents first, and reports the result for every row.

See Bulk Page Creator for Confluence