How can I automate the addition of labels to my newly created confluence pages?

John Conneely February 24, 2025

Before I start, I just want to flag that I am looking for any specific solution that can help me here. 

Technically speaking, my automation begins is in Jira Product Discovery, but I am creating child pages with an automation in confluence, and that seems to be the most likely place where I can fix the issue I am having. 

The steps I'm trying to complete

1. Idea has a checkbox called Generate Project page in JPD
2. When clicked, and based on the other filter fields, a page is created off a PRD template in my confluence space
3. (help needed here) - certain labels are applied to the confluence page 
4. The link then gets populated in the JPD idea
5. Over on confluence, a separate automation kicks in when it sees a page being edited, and the labels from 3. are added to the page
6. Based on the labels added, a bunch of different child pages get added to the parent. 


Screenshot of main JPD automation:

Main doc generation automation.png

Screenshot of Main Confluence Automation

Main conf generation automation.png


What I have tried so far

- Adding labels to the templates in confluence (doesn't get populated into generated file. Seems to be commonly known issue)

- The HTTP Web request as seen above - I'm getting 403, and assuming its since I don't have PAT enabled on my account, and can't see the options anywhere in confluence (not the overall admin)

- Added an automation to add labels when the template is used and page created off that template (don't know why this one is not working, it seems to be exactly what I want)

add lables automation.png

1 answer

0 votes
Tomislav Tobijas _Koios_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 24, 2025

Hi @John Conneely ,

Kudos for the details provided here! One question though - are you trying to add labels directly from the automation rule in Jira? Or, are you trying to add labels from the second automation rule in Confluence?

Regarding each variant/path:

  1. If trying to do everything in Jira, can you maybe add delay action (if you're on Premium plan or above) between creating a page and sending a web request? Might be that the web request is 'quicker' than create page action and thus why labels are not added.
  2. If in Confluence, have you tried checking the option to allow other rule actions to trigger this rule option? This is available in the rule details tab. Basically, you could create a rule that would check when the page is published (via that Jira automation) and add all those necessary labels (which seem to be predefined/not copied from the Jira issue)2025-02-24_12-13-01.png

Cheers,
Tobi

John Conneely February 24, 2025

Thanks @Tomislav Tobijas _Koios_ !

I'm trying both at the moment, as neither is working! Ideal scenario is that the automation in JPD is simple enough, and the labels would be added by the confluence automation. 

For 1. I have the delay already, but it seems to be a API token connection issue. I tried a bash script to connect and retrieve the details of the page outside of automation and I got the same connection issue. 

A few things pointed to this and I don't see that setting on my user profile, so assuming its not active. Will be chatting my jira admins later on the same. If this isn't a widely shared access though, I may avoid this technique as I want the automation to be fairly simple to share across other teams/people

For 2. 
I do have that checkbox created on a rule that does that - was expecting this to just "Work" as it seems to be exactly what I am looking forrock labels.png 


John Conneely February 24, 2025

Ah Just as I had posted that I checked the audit log for the above rule and seeing:

This rule execution was aborted before it could complete. The rule actions were not performed for all associated items.
Rule seems to work correctly, just not being actioned on for some reason
John Conneely February 24, 2025

Added in a log action to see what was going on, as another blog stated there might be issues adding labels where the template already had same labels:

log issue.png

 

Just seems to be stalling at the condition for checking if a page was created with that template. I even removed the [] in the template name to see if that was what was causing issue

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events