Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Approach to programmatic creation of new page

Phillip Morley November 9, 2018

Hi--

I am considering an approach to programmatically create a page based on form input and would like to ask this community for comment / suggestions.  Here is the approach I am considering:

Using HTML macro, display user form. Use HTML Macro and REST API to create new page. Based on form fields, create different content for the new page using the REST API, including page properties that could later be reported on. 

Then redirect the user to the newly created page. 

Would appreciate your thoughts on the above approach. I have space admin permissions only. 

 

 

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 16, 2018

Hello Phillip,

Using Confluence to create flexible and dynamic content is a great idea. You can most certainly use macros to build in this function. Another options would be to build a Confluence blueprint that can prompt the user for input before the page is created. Within the blueprints you can include the page properties macro as you requested.

Something to keep in mind with blueprints is you do need to know a bit of Java to create them. Along with needing more access to Confluence System Administration. Here is the documentation on Blueprints. Along with an introduction to Confluence Blueprints. There are marketplace add-ons that allow for easier creation of blueprints. Here is a marketplace query for Blueprints.

If you wanted to still use the REST API, you can most certainly create pages based off form data. The difficult part with this will be to ensure the add-ons you use allow for API calls and are able to pass data through to an API call. Along with this you need to ensure you use the REST API page storage format to create the content in your page. Here are the examples for the REST API Manipulating Content.

I hope you find this information helpful.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, knowledge sharing, intentional knowledge sharing playbook, loom, confluence, team collaboration, knowledge management, workplace productivity, information silos, documentation best practices, internal communication, knowledge sharing strategies

Conquer collaboration chaos with Loom + Confluence

You don't need more tools. You need tools that actually work together – the way humans do. See how Loom + Confluence help teams collaborate with more context, more connection, and fewer calendar invites. 💪

See inside
AUG Leaders

Atlassian Community Events