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.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.