Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Delete a page when an updated/copied version of the page is created

Nikita Aurora
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2023

Hi Community,

I've built a manual trigger on confluence which when runs, creates a copy of that page on another space with the latest date. However, what I want is that as soon as this copy is created the older versions of that page with older dates should get deleted/archived. I'm trying to create a rule but not sure on what comparison values should I use to compare both the pages to retain the one with the latest date. Right now, the page title is {{content.title}} - {{now.shortDate}} which gives the name of the page with the latest date. Can someone please guide?

1 answer

0 votes
Luiz Ricardo Pereira da Silva January 29, 2024

Hello @Nikita Aurora
Using the Action Variable can help you.

Try creating a variable containing the page title {{page.title}}:

A second variable containing the date of first publication {{page.dateFirstPublished}} or the date of last update {{page.dateLastUpdated}}:

This will save the information from the triggered page.

After copying the page, create other variables to store the information from the copied page:

Use the {{smart values}} condition:


First value = {{date}}
Condition less than
Second value = {{copydate}}
Create an Advanced branching with the date value of the triggered page:

Finish by inserting the delete page or archive page action within the Branch:

In the testing stage of this automation rule, I used the Log Action action to check whether the values were being stored correctly in the variables.
To confirm that each variable is returning a value, simply use Log Action with the name of the variable inside.
This will bring the values of each one to the audit log of the execution.

Hope I helped you!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events