---
title: "Separate draft and approved content with the Copy Page action"
canonical: "https://support.appfire.com/space/CDMC/3971842800/Separate+draft+and+approved+content+with+the+Copy+Page+action"
format: markdown
---
> Macro (aura-html)

## Overview

Use the **Copy Page** action to ensure readers see the latest approved version of a page rather than the working draft.

When a page reaches the *Approved* workflow state, the action copies it to a separate space. Authors can continue editing the source page without affecting the copied version, while readers can access approved content without needing access to the Draft space.

The copied page includes workflow state, metadata, and Document Activity, providing an audit record of the approval process and the document control information associated with that version.

The copied page remains unchanged until the next approval triggers an update.

*Watch how to use the Copy Page action to separate draft and approved content in Confluence.*

## The scenario

A company manages employee policies in Confluence. Authors create and review policies in a Draft space, while employees access approved versions in a separate space.

### What you'll build

In this example, you'll configure a four-state approval workflow that uses the **Copy Page** trigger action to copy approved content to a separate Confluence space.

- **Source space:** Draft Policies, where authors create and review policies.
- **Source page:** Remote Work Policy.
- **Destination space:** Published Policies, where readers access approved policies.
- **Workflow:** Remote Work Policy Approval, with four states:
  - **Draft:** Authors prepare the policy and submit it for review.
  - **Review:** Reviewers approve or reject the policy.
  - **Approved:** The Copy Page action copies the approved policy to the destination space.
  - **Rejected:** Authors can revise the rejected policy.
- **Trigger:** Runs when the workflow state changes to *Approved*.

When the source page is updated, it returns to *Draft*. The copied page remains unchanged until the updated policy is approved again.  


> Macro (1afdce52-d22e-4d27-84db-5be989c3c83b/92d899e8-452f-4c9b-9f60-823ab11c8253/static/drawio)

### Prerequisites

Before you begin, ensure that:

- You have space administrator permissions to configure workflows in the source space.
- You have a source space where authors create and review content. This example uses *Draft Policies*.
- You have a destination space where readers access approved content. This example uses *Published Policies*.
- The *Remote Work Policy Approval* workflow is configured in the *Draft Policies* source space and applies to the *Remote Work Policy* page. The workflow contains four states: *Draft*, *Review*, *Approved*, and *Rejected*.
- The Comala Document Management app user has permission to create and edit pages in the destination space.

> ℹ️ Configure Confluence space and page permissions so readers can access the approved content without accessing working drafts.

### Example workflow

The *Remote Work Policy Approval* workflow contains four states: *Draft*, *Review*, *Approved*, and *Rejected*.

The workflow follows these transitions:

| **From state** | **Event** | **To state** |
| --- | --- | --- |
| Draft | Approved | Review |
| Review | Approved | Approved |
| Review | Rejected | Rejected |
| Review | Updated | Draft |
| Approved | Updated | Draft |
| Rejected | Updated | Draft |

When the page reaches the *Approved* state, the **Copy Page** trigger action copies it to the *Published Policies* space. If the source page is updated, it returns to *Draft*. The copied page remains unchanged until the updated policy is approved again.

![image-20261201-045818.png](media://91c311ec-45e4-489a-880d-3a0eb64b8e7d)

## Steps to configure the workflow to copy approved content

In this example, you'll configure a workflow trigger that automatically copies the *Remote Work Policy* page from the *Draft Policies* space to the *Published Policies* space when its workflow state changes to *Approved*.

### Step 1: Create/Edit your workflow in the visual builder

1. Go to the *Draft Policies* space in Confluence.
2. Under **Space Apps**, select **Comala Document Management**.
3. Edit the required workflow.
  
4. In the workflow builder, select **Add trigger** in the **Navigator** panel.

![image-20261201-050257.png](media://3bcf1792-90a9-446a-8cc2-ddab1da3a4ed)

### Step 2: Configure the trigger event and condition

1. Configure your trigger event. Under **Event**, select **on state changed **from the dropdown.
2. Configure your trigger condition: Under **Conditions**, add a **State** condition. Set the operator to **Equals** and select *Approved* as the state.  
This configuration runs the trigger when the page transitions to the *Approved* workflow state.

![image-20261125-172541.png](media://5552ab68-b17f-4845-b677-50deb2e22a04)

### Step 3: Add the Copy Page action

1. Configure your trigger action: Under **Actions**, click **Add action**.
2. Select **Copy Page** from the **Action** dropdown.
3. Configure the following settings:
  - **Target space:** Select *Published Policies*.
  - **Parent page location:** Select **Child of home page**.
  - **Target page title:** Select **Keep same title**.
  - **Target page publisher:** Select **Comala Document Management**. This allows the app user to copy the page without requiring individual users to have create or edit permissions in the destination space.
  - **Confluence content:** Keep **Attachments**, **Labels**, **Page properties**, and **Custom content** selected. Clear **Restrictions** so the source page's restrictions aren't copied to the destination.
  - **Data to copy:** Select **Full Comala Document Management data** to include the workflow state, metadata, and Document Activity as static content.
4. Click **Add** to save the action.
5. Save the trigger and workflow.

![image-20261201-050736.png](media://50bf1d28-bd06-462d-920c-3090fc3b970e)

### JSON example

The following JSON defines the *Remote Work Policy Approval* workflow, including its four states, approvals, transitions, and Copy Page trigger. When the source page reaches the *Approved* state, the action copies it to the *Published Policies* space (`PUBPOL`).

```json
{
  "HTMLdescription": "A four-state workflow for reviewing and approving the Remote Work Policy. <ul><li>The initial state is <i>Draft</i>. When approved, the page moves to <i>Review</i>.</li><li>In the <i>Review</i> state, the page moves to <i>Approved</i> when approved or <i>Rejected</i> when rejected.</li><li>When a page in the <i>Review</i>, <i>Approved</i>, or <i>Rejected</i> state is updated, it returns to <i>Draft</i>.</li><li>When the page reaches <i>Approved</i>, the Copy Page trigger action automatically copies it to the Published Policies space.</li></ul>",
  "description": "Reviews and approves the Remote Work Policy through Draft, Review, Approved, and Rejected states. Automatically copies the approved page to the Published Policies space using the Copy Page trigger action.",
  "id": "bas",
  "name": "Remote Work Policy Approval",
  "parameters": [],
  "states": [
    {
      "approvals": [
        {
          "authentication": "none",
          "commentsRequired": false,
          "decisionCriteria": {
            "decisionType": "unanimity"
          },
          "name": "1st Approval",
          "rememberAssignees": false,
          "requiredParticipation": {
            "participationType": "all_or_default"
          },
          "resetAfterUpdate": false,
          "reviewers": {
            "allowedReviewers": "assigned",
            "assignable": true,
            "selfAssignable": true
          }
        }
      ],
      "colour": "#ffab00",
      "name": "Draft",
      "transitions": {
        "approved": "Review"
      }
    },
    {
      "approvals": [
        {
          "authentication": "otp",
          "commentsRequired": false,
          "decisionCriteria": {
            "decisionType": "unanimity"
          },
          "name": "Approval",
          "rememberAssignees": false,
          "requiredParticipation": {
            "participationType": "all_or_default"
          },
          "resetAfterUpdate": false,
          "reviewers": {
            "allowedReviewers": "assigned_and_editors",
            "assignable": true,
            "selfAssignable": true
          }
        }
      ],
      "colour": "#FFAB00",
      "name": "Review",
      "transitions": {
        "approved": "Approved",
        "rejected": "Rejected",
        "updated": "Draft"
      }
    },
    {
      "colour": "#14892C",
      "final": true,
      "name": "Approved",
      "transitions": {
        "updated": "Draft"
      }
    },
    {
      "approvals": [],
      "colour": "#FF5630",
      "name": "Rejected",
      "transitions": {
        "updated": "Draft"
      }
    }
  ],
  "triggers": [
    {
      "event": "on-change-state",
      "conditions": [
        {
          "state": {
            "operator": "equals",
            "value": [
              "Approved"
            ]
          }
        }
      ],
      "actions": [
        {
          "action": "copy-page",
          "title-strategy": "keep_same",
          "publisher-strategy": "cdm_app_user",
          "copy-attachments": true,
          "copy-labels": true,
          "copy-properties": true,
          "copy-restrictions": false,
          "copy-custom-content": true,
          "copy-cdm-data": true,
          "target-locations": [
            {
              "parent-location": "space-home",
              "spaceKey": "PUBPOL"
            }
          ]
        }
      ]
    }
  ]
}
```

When the source page reaches the *Approved* state, the Copy Page trigger action:

- Copies the *Remote Work Policy* page to the *Published Policies* space (`PUBPOL`).
- Places the copied page under the destination space's home page.
- Keeps the source page title and uses the Comala Document Management app user as the publisher.
- Copies attachments, labels, content properties, and custom content, but excludes page restrictions.
- Includes workflow state, metadata, and Document Activity as static content.

> ℹ️ The workflow runs only in the *Draft Policies* source space. Since **Full Comala Document Management data** is selected, the copied page retains the workflow state, metadata, and Document Activity as static content. The workflow information is read-only, and workflows configured in the destination space don't apply to the copied page.

## Test the workflow

After configuring the Copy Page trigger action, test the workflow to verify that the approved page is copied to the destination space.

### Approve the page

1. Open the *Remote Work Policy* page in the *Draft Policies* space.
2. Open the workflow dialog from the page byline and complete the approval in the *Draft* state to move the page to *Review*
3. Complete the approval in the *Review* state. The workflow moves the page to *Approved*.

![image-20261125-174407.png](media://bbc7a9d5-a918-4433-9891-78f607d5ac3f)

4. When the page reaches the *Approved* workflow state, the Copy Page action automatically creates a copy in the *Published Policies* space.
5. Open the *Published Policies* space and verify that a copy of the *Remote Work Policy* page has been created.

![image-20261201-092721.png](media://7cf17813-1c3e-40e9-aa22-cb738fb8f23d)

> 📝 If a page with the same title already exists in the destination space when the Copy Page action runs for the first time, **Copy** is appended to the new page's title. Subsequent approvals will update that copied page instead of creating another copy.

### Test subsequent updates

1. Open the source *Remote Work Policy* page in *Draft Policies*.
2. Edit the source page and save your changes in Confluence. The workflow automatically moves the page back to *Draft*.
3. Complete the required review and approval steps until the page reaches the *Approved* state.
4. Open the copied *Remote Work Policy* page in *Published Policies* and verify that:
  - The page contains the latest approved changes.
  - The workflow state dialog displays the *Approved* state and Document Activity.
  - The workflow information is read-only, and no workflow transitions are available.

> ℹ️ When the source page reaches the *Approved* state again, the Copy Page action updates the existing target page instead of creating another copy. The copied page includes the latest approved content, workflow state, metadata, and Document Activity as static content. 
> ℹ️ 
> ℹ️ The Copy Page action identifies the existing target page using its Confluence content ID. When the source page is approved again, the action updates the linked target page, even if its title has changed.
> ℹ️ 
> ℹ️ **Note:** Users with edit permissions can modify the copied page directly in Confluence. If the page content is modified, the workflow byline indicates that it has changed since the last approval. These changes are overwritten when the source page is approved again.
> ℹ️ 
> ℹ️ To prevent unintended changes, restrict editing permissions in the destination space.

## Related pages

- [Copy Page trigger action](https://appfire.atlassian.net/wiki/spaces/CDMC/pages/2193950590)
- [Behavior and known limitations](https://appfire.atlassian.net/wiki/spaces/CDMC/pages/3971220238)