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

Bernd Anderer
Contributor
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
Contributor
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
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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
Contributor
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 # people like this
Ravi November 17, 2024

Thanks..This work. @Nikola Perisic 

Is there way to create a nested page (instead of sub page)under the parent page?

e.g. Parent Page    issue.Summary

Nested Page --Issue.summary -Risk Register

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events