If you use Jira and Confluence together, have you ever had to:
This involves a lot of tedious and manual steps, as well as switching between Jira and Confluence. The linking step requires you to manually specify the Jira issue and the Confluence page being linked to. Most of the current docs & guides available from Atlassian more or less follow this manual method:
What if I tell you, there is another secret way achieving the similar result?
In this article, I’ll introduce our AgileOps way of seamlessly integrating Jira and Confluence together, by leveraging the power of Jira Automation and REST API calls. We can trigger this automation process from a specific Jira issue and then have the Confluence page automatically created and linked back to Jira.
First, let’s see how the solution works in action. Then we’ll dive deeper into how to set it up.
In any Jira issue, we trigger this Create page in Confluence automation rule. I’ll show you how to set it up in the next section The Setup:
Voila, a new Confluence page is automatically created and linked back to the triggered Jira issue:
Navigating to the created Confluence page, we can see the page has been automatically linked to the Jira issue, resulting in a bio-directional link in one simple process.
This saves you the hassle of having to go back and forth between Jira and Confluence and manually linking Jira issue and Confluence page.
Step 1: Create a manual Jira Automation rule
Click Create rule, then choose Manual trigger from issue as the trigger:
Step 2: Configure an action step to create Confluence page
Add a new component, choose Create page in Confluence as an action:
Then, click Connect to connect with the Confluence site we want to create page from, and configure the options as shown below:
When the rule is triggered on a Jira issue, this action step will create a Confluence page with the title populated from the Jira issue data.
Step 3: Link the newly created Confluence page to the triggered Jira issue using remote links REST API
Add a new Send web request action step, then configure the options as shown below:
{ "globalId": "appId=YOUR_CONFLUENCE_APP_ID&pageId={{createdPage.id}}", "application": { "type": "com.atlassian.confluence", "name": "System Confluence" }, "relationship": "Wiki Page", "object": { "url": "https://YOUR_ATLASSIAN_SITE/wiki/pages/viewpage.action?pageId={{createdPage.id}}", "title": "Wiki Page", } }
Finally, publish the rule and turn it on.
Now, pick any Jira issue, run the published rule, and you should see everything works exactly like The Demo:
This solution is a game-changer for various tasks:
To sum it up, using Jira and Confluence together, the way this article suggests, can really boost how well your team works together and cuts down on the back-and-forth between different apps. It's flexible enough to fit into any department's workflow.
I wrote blog posts about Jira, Automation, Atlassian ecosystem that help make business processes run more efficient:
Follow me and stay tuned for the upcoming articles on this topic:
Is there a method to pull fields from the Jira issue and add them to the confluence page? Our Confluence is whitelisted so we aren't able to call the API endpoints from Jira so I am working on a method to create a page from a Jira Automation that passes the body for the create page endpoint to a lamda that then passes that information into Confluence to create a page. It works but is not very clean and difficult to configure.
Smart values work but they're finicky. I was trying to populate a table on a Confluence page and had to settle for sending the values in a list.
I am able to populate a table with individual fields, I ended up setting the field values into a variable in the automation and that has worked better for custom fields, The page I am working on only interacts with 1 jira issue I suspect if I had to use multiple it would be much more difficult.
@Dan W That's slick! I may go update mine!
This is very cool, and my team is going to be jazzed.
I'd like to recommend a couple edits to the article.
Hi
I have gone through all the steps in this example. However, the page is created, but no links appear in the Confluence page and the Jira issue. I am an admin on both the Confluence Space and the Jira Project.
I get this in the audit log:
Action details:
Manual trigger
Ruud Ravensbergen triggered the rule
Create page in Confluence
Created page: SBP1-880 - [SBP1] - Determine KPE theme
Send web request
Error publishing web request. Response HTTP status:
404
Error response HTTP body:
{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}
But the page is there.
@Ruud Ravensbergen It seems like your Authorization Header isn't configured correctly. Did you follow these steps: https://community.atlassian.com/t5/Jira-Software-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828?
And i used this Powersheel code to make the Value
And I also tested using only the "Create page in Confluence" but there is no link to it either, Maybe I should talk to functional management.
Edit : I did see my typo, set it to basic. still does not work
@Ruud Ravensbergen I always generate my base64 via Terminal on my Mac - you might try whatever gives you a command line prompt You might try this and see if you get a different encoded value; also make sure to trim your white space. Beyond that, I'm really not sure what to try, other than to have another Jira admin try with their credentials.
(I initially read "Powersheel" as "Powersheet" and assumed it was an unknown-to-me spreadsheet product - sorry!)
Hi @Kiet Ngo , thanks for writing up this procedure in such detail. Would it be possible to display Confluence blogs, whiteboards, or even databases in JSM using this method? I'm not a script writer or very knowledgeable in API usage so don't know the limitations but @Robert Hean is looking for a way to do this and I was wondering if this would be possible. Thanks!
This solution, like other integration solutions, depends on the exposed APIs of the destination system. The best way to assess feasibility is to check whether those objects (such as blogs, whiteboards, and databases) are supported by Atlassian's APIs.
I did some quick research, and looks like whiteboards are supported here, but databases are not.
Thanks @Kiet Ngo , I appreciate your time to research this. @Robert Hean , are you able to tell if Atlassian's APIs will support what you need?
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Jira Administrator
Configure Jira Software, Jira Core, or Jira Service Management, including global settings, permissions, and schemes.
Managing Jira Projects Cloud
Learn to create and configure company-managed projects in Jira Software and partner effectively with Jira Admins.
Learning Path
Become an effective Jira Software Project Admin
This learning path is designed for team leaders who configure Jira Software projects to match a team's processes.