Today, we have the option to create a Confluence page when an issue is created, but it has to be based on a template. There is no option to copy an existing page.
Is there a way to automate this process, either using JIRA Automation, or another approach?
Hi @Bruno Ribeiro _Brunoxweb_ -- Welcome to the Atlassian Community!
From where in Jira do you see an option to create a Confluence page when you create a Jira issue? Is that from a marketplace addon / app?
Regarding automation rules, I seem to recall there is a REST API endpoint to copy a Confluence page based on its ID value, and if there is...that could be called with the Send Web Request action.
If I am incorrect and that endpoint does not exist, one could instead use a REST API endpoint to read a page's content and then use another to create a new page using the first one's contents (making modifications as needed).
Kind regards,
Bill
Hey @Bill Sheboy yeah, they introduced this I guess back in March 2024:
But as @Bruno Ribeiro _Brunoxweb_ points out you can only create pages based on a template, and even more annoying, the only thing you can customize about the page is the Title.
Wow didn't know about the Copy page endpoint. And... it works! Neat.
What tripped me up is that I had to NOT include the body that was included in the example, as that's optional.
So the curl example worked, without that:
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/copy' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json;charset=UTF-8' \
--header 'Content-Type: application/json' \
--data '{
"copyAttachments": true,
"copyPermissions": true,
"copyProperties": true,
"copyLabels": true,
"copyCustomContents": true,
"destination": {
"type": "space",
"value": "<string>"
},
"pageTitle": "<string>"
}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.