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

1 vote
Stephen Deutsch Community Champion Jul 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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,704 views 25 10
Join discussion

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