How to automatically create a page under specific section in confluence?

Himanshi April 13, 2022

Hi there, I am using the attached project automation to automatically create pages in confluence, which works!

However, I need to create the page under specific section/folder/parent page.

What can be done for that?

 Project_Automation.PNG

1 answer

1 accepted

0 votes
Answer accepted
Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 13, 2022

Hi @Himanshi 

Would this simply not work if you change the base request url and include the {page ID} of the parent page where you wan to create the content?

/wiki/rest/api/content/{pageId}

If not overall @Esther Strom might be able to help here since I remember she wrote a pretty detailed article about this functionality

https://community.atlassian.com/t5/Jira-articles/Automating-the-creation-of-a-Confluence-page-linked-to-a-Jira/ba-p/1760738

There is also an official KB article about this topic

https://confluence.atlassian.com/jirakb/create-confluence-pages-from-jira-using-automation-1041826324.html

which might be useful for someone that is overall interested in how this works.

Himanshi April 13, 2022

Thanks, Mirek, this helped. I found out that Adding Ancestors array in my existing json, resolved this issue. 

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 13, 2022

Yes, ancestors! :) That is great! Maybe you can share your final code (JSON) so that everyone that would face the same problem would benefit? :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events