Confluence Automation - Page Approvals

Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2024

Hello everyone!

I wanted to share a simple page approval process using Confluence Automation. 

While I love marketplace add-ons, I wanted to see if we could do this out of the box.

Feel free to try it out and/or supply some feedback!

The process

  1. User creates or modifies a page.
  2. Page gets put into Draft page status.
  3. When ready, the user updates the page status to Review.
  4. The approver reviews the content and then updates the page status to Approved.
  5. Modified Approved pages are automatically changed back to Draft.

The backend:

  • Utilizes content statuses for approval automation.
  • Labels and updates page statuses via automation.
    • Automation can also restrict the page to approvers if needed.
  • Emails the approvers when pages need reviewed.
  • Dashboard/page using Filter Labels shows pages which need reviewed.
  • Emails the author that their content is under review.
  • New pages are automatically flagged as draft.
  • Edited approved pages cycle back though the approval workflow.

 

The TL/DR setup:

[Automation #1] New pages to Draft

  • When: Page published
  • Condition:
    • {{page.contentStatus}} equals Empty 
  • Then: Change page status = draft
  • And: Add label = draft

 

[Automation #2] Draft to Approval Required (condition 1)

  • When page status changed = Approval Required
  • Condition:
    • {{page.labels}} contains draft
  • Then: Remove label = draft
  • Then Add label = approval-required
  • And Send email to approvers
  • And Send email to author
    • To: {{page.author.emailAddress}}

 

[Automation #3] Draft to Approval Required (condition 2)

  • When page status changed = Approval Required
    • Condition:
      • {{page.labels}} does not contain draft
  • Then: Add label = approval-required
  • And Send email to approvers
  • And Send email to author
    • To: {{page.author.emailAddress}}

 

[Automation #4] Approval Required to Approved

  • When page status changed = Approved
  • Then: Remove label = approval-required
  • And: Add label = approved
  • And Send email to author
    • To: {{page.author.emailAddress}}
      • Hi {{page.author.publicName}}

 

[Automation #5] Approved to Draft

  • When page is edited
  • Condition 1:
    • {{page.status}} equals Approved
  • Condition 2: 
    • {{page.labels}} equals approved
  • Then: Change page status = draft
  • And: Add label = draft
  • And: Remove label = approved


Page Review Dashboard

  • Layout 3 columns
  • 3x Filter by label (content by label)
    • draft
    • approval-required
    • approved (last 10)

dashboard.png


I hope this helps someone out! 

 

4 answers

1 accepted

3 votes
Answer accepted
Uday Kiran Bhaviri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2024

For approved pages add label review completed.

So always check for two conditions

For status changed to Approved and label contains page review required

Then Automation 3

Also add label Review completed in automation 3

Status = Approved and label contains page review completed

Then automation 4

Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2024

@Uday Kiran Bhaviri 

I see what you want me to do, but I am having an issue with the CQL. Could you let me know the proper formatting?

ccql.png

Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2024

SUCCESS!

I am going to update my content above. @Uday Kiran Bhaviri Thank you very much for the help.

Like Uday Kiran Bhaviri likes this
0 votes
Jérémie Skornik March 12, 2024

Hi @Jonathan Smith!

Thanks for sharing this approval process, it's really cool!

There's one step I'm curious about : "Send email to approvers". Where exactly is this list stored on the page, and what smart value are you using to retrieve it?

I'm looking for a way to email all the attendees of a meeting when the meeting notes are published and couldn't find a way. Maybe if I could use approvers for my use case?

Thanks again, and have a great day!

Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2024

Hi @Jérémie Skornik 

The approvers in my case are always the same so I hard code their emails in the TO: line.

Your case seems more complex and I am not sure if this automation will be helpful.

I'd suggest creating a support request and see what Atlassian suggests.

Cheers.

Disclaimer: We are not using this automation yet, it was a proof of concept :) We are also evaluating 2 other marketplace add-ons.

Like Jérémie Skornik likes this
Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2024

@Jérémie Skornik Here are all of the smart values available: https://support.atlassian.com/cloud-automation/docs/smart-values-in-confluence-automation/

To handle your request, Atlassian would need to make a new smart value called {{page.mentions.users}}. Thus, automation would email "anyone mentioned on the page" your meeting information.

If you like this idea, please submit an enhancement request :) if not, you may need to play around with watcher settings. 

Jérémie Skornik March 13, 2024

Thanks @Jonathan Smith for your answer, your input is much appreciated!

Would you happen to know where is the best place to submit an enhancement request? I can send a message to support directly but maybe there's a specific place for this I'm not aware of?

0 votes
Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2024

I was driving up to the Wisconsin Dells this weekend and could only think "why didn't I use branch actions instead of creating 4-5 automations...". I may revise the item above at some point.

0 votes
Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

It would be extremely helpful if there was a way to automate the following:

  • When page published - restrict to {{page.author}}

Anyone know if this is possible? 

Antal Vig _ Communardo February 23, 2024

Absolutely, I was just about to ask the same thing. This would help tremendiously when it comes to approval workflows. 

Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 29, 2024

Support is looking into this request. Will keep you posted.

Jonathan Smith March 4, 2024

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events