Add Macro in Bulk

Add Macro in Bulk

The Add Macro in Bulk feature allows Confluence administrators to insert a specific macro into multiple pages at once. This is ideal for standardizing content across pages—for example, adding banners, panels, or status macros to many pages simultaneously.

1. Configure Scan Conditions

1.1. Select Scan Mode

Choose how the pages should be scanned. Note that some native macros (e.g., info, warning) are not searchable via Atlassian’s Search REST API, so they require full-page scanning.

Scan Mode

Description

Scan Mode

Description

Search pages

Scans only pages that contain specified macros. Fast, but not compatible with certain native macros.

Scan all pages

Scans all pages in the selected spaces. Required for macros like info, warning, etc.

image-20250503-065540.png

If the macro already exists on a page, it won’t be added again.

1.2. Define Macro Settings

Specify the macro to insert, along with its parameters and position.

Field

Description

Field

Description

Macro name

Use the macro name as it appears in the storage format. You can find this via More → Advanced Details → View Storage Format on a Confluence page.

Macro parameters

Input parameters in XML storage format. Example:
<ac:parameter ac:name="parameter-name">parameter-value</ac:parameter>

Macro rich text

Optional rich text content, supported only by some macros. Example:
<ac:rich-text-body>rich-text-value</ac:rich-text-body>

Macro position

Choose where to insert the macro: at the beginning or end of each page.

image-20250503-065618.png

1.3. Import Existing Macro

You can import the configuration from an existing macro on a page to quickly populate the macro fields.

image-20250503-070420.png
image-20250503-070438.png

1.4. Define Target Scope

Choose which pages to include in the scan.

Field

Description

Field

Description

Target spaces

The Confluence spaces where the macro will be added.

Content type

Choose to scan pages, blog posts, or both.

Filter by labels

(Optional) Include only pages with any of the selected labels.

image-20250503-065651.png

2. Run Bulk Operation

2.1. Preview Scan Results

Click Start Scan to preview the list of pages that match your criteria.

image-20250504-030900.png

2.2. Start Task

Click Add Macros to run the bulk operation. A background task will be created—you may stay on the page or leave safely while it runs.

image-20250504-031141.png

3. Best Practices & Tips

  • Always test in a staging or test space before applying changes to production spaces.

  • Use Scan All Pages mode when inserting native macros like info or warning which cannot be found via the Search API.

  • You can find macro name and parameters from storage view of the page via More → Advanced Details → View Storage Format on a Confluence page.

  • You can mainten a page to contain some frequently used macros. You can use Import Existing Macro to search this page and select an existing macro from this page so that the parameters can be populated automatically into the fields.