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

How to make a automation rule which copy the most recently created page among child pages?

hasungjoo June 27, 2024

weekly.png

 

How to make a automation rule which copy the most recently created page among child pages?

 

When Monday 9 am every week, make "week 6" named child pages copy from "week 5" page. 

is it possible to make by automation rule?

2 answers

0 votes
Trev Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2024

Hi @hasungjoo, this is Trevor from the Confluence automation team. Here's a rule that I think would work for you:

Screenshot 2024-06-28 at 1.10.07 PM.png

This rules runs every Monday at 9 AM, finds pages which were published within the last 8 days that have a certain parent page, and then publishes a copy with the title "Week of 6/24/24" (for example). So the rule assumes that no more than one page gets published each week under the parent.

Here's the CQL that I used to configure the "related entities" branch component: type = page AND parent = 92405761 AND created >= now("-8d")

You would just replace the number there with the ID of your parent page.

Another approach you could consider is having a single template page that gets copied every week. Then your CQL would be even simpler: type = page AND id = 123456 (where the number is the ID of your template page)

hasungjoo July 8, 2024

Thanks @Trev Angle , 

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2024

Hi @hasungjoo -- Welcome to the Atlassian Community!

First thing, I am not using Confluence automation rules, and so my suggestions are based on what I know about automation rules in general.  With that out of the way...

I do not believe there is a "lookup pages" rule action to use CQL to find the pages, and so identify the most recent one.

However I hypothesize a rule could use the Send Web Request action to call the Confluence REST API to get the pages in your space, identify the most recently created one, and then use that for the copy page action.

Kind regards,
Bill

hasungjoo June 27, 2024

Thanks! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events