This article helps build a solution using Jira Automation and Confluence REST API to link a newly created Confluence page with a Jira issue.
For instance, When a confluence page is created using Jira Automation, the page link should be added to the Jira issue.
This can be done using the Create or update remote issue link API endpoint, here's an example of the request:
URL: https://<SITE_URL>/rest/api/3/issue/{{issue.key}}/remotelink
Method: POST
Web request body:
{
"object": {
"title": "{{issue.key}} {{issue.summary}}",
"url": "{{createdPage.url}}"
}
}
Headers:
Accept: application/json
Content-Type: application/json
Authorization: Basic <encoded Email:APIToken>
For more details on how to encode the credentials, please check this article: Automation for Jira - Send web request using Jira REST API
Alternatively, you can add the smart value that includes the page URL in a comment or a field:
{{createdPage.url}}
Illustration:
Thank you for reading and Happy Automation!
Other related articles:
Jira Automation: Updating a Confluence page with information from Jira issues
Hala ElRoumy
Jira Cloud Support Engineer
Atlassian
Amsterdam
4 accepted answers
0 comments