Automate linking of Confluence pages to Jira Cloud work items

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Learn to link a new Confluence page to its originating Jira work item using Automation for Jira.

Solution

Create the Confluence page

Ensure your automation rule is setup to create a Confluence page using the "Create Confluence page" action. This action should already be part of your existing automation rule.

Capture the Confluence page URL

Use smart values to capture the URL of the newly created Confluence page. You can use {{createdPage.url}} to get the URL of the page created by the automation rule.

Link the Confluence page to the Jira work item

Since there is no direct action to link the Confluence page to the Jira work item within the automation rule, you can use the Jira REST API to achieve this.

Use the "Send web request" action in your automation rule to call the Jira REST API and link the Confluence page to the Jira work item. You will need to use the {{createdPage.url}} smart value in your API call to specify the page URL.

API Call Example

Use the following API endpoint to create a link between the Jira work item and the Confluence page: POST /rest/api/3/issue/{{issue.key}}/remotelink.

In the payload, include the URL of the Confluence page:

{ "object": { "url": "{{createdPage.url}}", "title": "{{createdPage.title}}" } }

Ensure you have the necessary permissions and authentication setup for the API call.

Updated on May 30, 2025

Still need help?

The Atlassian Community is here for you.