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

How can I create a parent page and multiple Sub-Pages with automation?

Bernd Anderer July 2, 2024

When an Issue is create in Jira, I want to create a NewPage  in a Confluence space, plus a list of sub-pages underneath the newly created page. The result should look like this:

Space

-NewPage

-- Page1 - x

-- Page2 -x

-NewPage2

--Page1-y

--Page2-y

the name of NewPage is based on the issue created in Jira. The Subpages will have a name that consists of a fixed part (e.g. Page1) + some individual part (e.g. -x)

The idea is, that with each new Jira Issue, I want to setup a documentation structure in Confluence, that will be the same for each new Issue.

How can I do that? I tried it in Jira automation - but don't really know on how to use the 

{{createdPage}} variable, to reference the first page as parent for all the sub-pages

Any idea on how I can achieve this?

Thanks in advance

Bernd

2 answers

0 votes
Rick Westbrock July 8, 2024

The way we solved this was to create a smart value named parentPageId and set it to {{createdPage.Id}} from the NewPage.

The person who created the automation just has the child pages created under the same parent that NewPage was created under then used a web request action to move the child page under NewPage by calling https://24hf.atlassian.net/wiki/rest/api/content/{{createdPage.Id}}/move/append/{{parentPageId}}

We had to use the web request as a workaround due to the fact that the Parent Page field of the action will not accept a smart value.

0 votes
Nikola Perisic
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.
July 2, 2024

Hello @Bernd Anderer 

Screenshot 2024-07-02 at 13.53.25.pngScreenshot 2024-07-02 at 13.53.34.png 

You can test this automation rule, where a page in first action is being created based on the summary of the issue, the second action is creating a sub-page and in the "Parent page" field, the page that was made from the first automation is being selected.

Bernd Anderer July 3, 2024

Hi @Nikola Perisic 

thank you for your feedback.

I am not able to add anything meaningful in "Parent Page".

What did you add there? I can not add any variable... I can only select existing pages... am I doing something wrong?Bildschirmfoto 2024-07-03 um 14.49.11.png

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events