Confluence Automations - scheduled page copy

Anne Warmer
Contributor
May 24, 2023

Hi everyone,

I'd like to user confluence automations to schedule a page tree to be copied into a different space every night. I've got two problems:

1. If I use the schedule trigger how do I determine the current page?

2. Is it possible to include child pages? if yes - is there a limit to the number of children? 

Thanks for your help, Anne 

 

 

2 answers

0 votes
Andrei Mokin
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!
August 7, 2024

Hi ,

have same trouble, not able to copy page with related childrens by using Automation...(idea here is to copy to another space as well rename each page)

Kind Regards

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2023

To use a scheduled trigger to copy a specific page, you'll need to use a CQL condition. Weirdly CQL doesn't let you specify a Page ID (which would be the most foolproof method), so you have to do something like:

space=HELP and title="YOUR PAGE TITLE"

And ugh, yeah, it looks like the Copy page action does *not* give you an option to copy children.

So... kind of a bummer.

If you really needed this functionality and can't wait for Atlassian to someday add it, you might need to purchase ScriptRunner, which has a built-in Copy Page Tree script.

What I don't see is how to get the "code" for that built-in script so that you can make it a scheduled Script Job.

Maybe somebody from Adaptavist could weigh in on that.

Anne Warmer
Contributor
May 30, 2023

Hi Darryl,

thanks for your answer. As we don't have scriptrunner licensed in confluence we are currently looking into the "send a Web Request" action of automations and trying to copy the pages via rest api  (https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---children-and-descendants/#api-wiki-rest-api-content-id-pagehierarchy-copy-post)

According to the Atlassian support. That should be feasible.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events