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

Sophie Alter
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2017

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

1 vote
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2017

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
TAGS
AUG Leaders

Atlassian Community Events