Can I create an automation in Confluence that would create the same document/template daily?

I need a document/template to be created on a dilay basis for the team to complete every morning, is that feasible or do I need to create it manually? 

1 answer

You could do something using scriptrunner, but I think your best bet is not to use a plugin or something similar, but rather use the REST API. This will require that you schedule something to run on a particular computer (it could be yours, or it could be the one running the Confluence software). You would need to install Curl on that computer and schedule something like he following command to run once a day:

 

curl -u <username>:<password> -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"<new_page_title> %date%", "ancestors":[{"id":<parent_page_id>}], "space":{"key":"<space_key>"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' https://<your_confluence_base_url>/confluence/rest/api/content/

You would have to copy the storage format of the page that you want to create into the command and fill in all the blanks (everything like <this>), and then you would have to adjust the date generator depending on which computer system you are using (%date% is for the windows command line). You could insert this into a .bat file or run it directly from windows scheduler for example.

 

It's a bit complicated, but it's currently the easiest way to do what you are asking for that I am aware of.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,192 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you