Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Rule for Incomplete Action Items/Task in Confluence - Include link to page?

Bell Lopez
Contributor
March 11, 2024

Howdy!

Has anyone had any luck creating an automation rule to email a user of incomplete tasks/action items in Confluence where you can include a link to the page where the incomplete action item is? 

2 answers

1 vote
Mark B Wager
Contributor
March 20, 2024

Hi @Bell Lopez 

You bet.  The specific code I use is:

LINK URL TO THE PAGE:  <a href="https://<YOUR SITE URL HERE>/wiki/pages/viewpage.action?pageId={{task.contentId}}">View Page with Task</a>

LINK URL TO ALL THE USER'S TASKS:  <a href="<YOUR SITE URL HERE>/wiki/home/tasks" >View All My Tasks</a>

I like to pretty it up using buttons for the above as well as providing some details of the task.

Here's the email I send out...

==============

I send TO the smart value {{task.assignee.emailAddress}}

With SUBJECT:   You have a Task due by {{task.DueDate.toBusinessDayBackwards.longDate}} on this page [{{page.title}}]

-------------------

EMAIL BODY:

<h3>CONFLUENCE TASK NOTIFICATION</h3>
Hello {{task.assignee.publicName.split(" ").first}},

<b>You have an assigned task coming due soon!</b>
<br />
<a href="https://<YOUR SITE URL HERE>/wiki/pages/viewpage.action?pageId={{task.contentId}}" style="background-color:#0052CC;color:#fff;padding:10px;text-decoration:none;border-radius:4px;font-size:14px;font-weight:bold;">View Page with Task</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<YOUR SITE URL HERE>/wiki/home/tasks" style="background-color:#B0C4DE;color:#fff;padding:10px;text-decoration:none;border-radius:4px;font-size:14px;font-weight:bold;">View All My Tasks</a>
<br />
<b>DETAILS:</b>
<table><tr><td style="border: 1px solid lightgrey;">
<ul><li><b>Due Date:</b>&nbsp;&nbsp;{{task.DueDate.toBusinessDayBackwards.longDate}} *
</li>
<li><b>Page:</b>&nbsp;&nbsp;<a href="<YOUR SITE URL HERE>/wiki/pages/viewpage.action?pageId={{task.contentId}}">{{page.title}}</a>
</li>
<li><b>Task message:</b>&nbsp;&nbsp;{{task.body}}
</li></ul>
</td></tr></table>

Have a great day!

This email was sent by Confluence automation
<br />
<b>*</b> This "Due Date" is displayed as the actual date unless due on a weekend -> then it displays as the first business day PRIOR to the due date.

===============

Results in this email:

Screenshot 2024-03-20 at 4.32.41 PM.png

===============

I also use a GROUP to put in only the users who want to be notified in a specific space.

Screenshot 2024-03-20 at 4.26.40 PM.png

And I send another similar email via automation for PAST DUE tasks, too.

I hope this helped.

Mark

Max.Clark
Contributor
September 19, 2024

Just want to say this is awesome!

Like Mark B Wager likes this
trthomas
Contributor
November 15, 2024

This is the best!  Thank you so very much!

0 votes
Shawn Doyle - ReleaseTEAM
Community Champion
March 11, 2024

Have you tried something like this?

automation_rule2.png

Put {{page.url}} in the email body for a link to the page.

Mark B Wager
Contributor
September 20, 2024

Hi Shawn,

True. Good point. People can replace <a href="{{page.url}}">{{page.title}}</a> for simplicity. 

And, if they are sure the page will render the URL as a link and they want to display the link instead of the page title, they could just use "Page:  {{page.url}}"

Thanks!

Mark

Mike C_ March 8, 2025

@Shawn Doyle - ReleaseTEAM or @Mark B Wager 

I tried to mimic this exact setup and it's working. One thing I'd like to do though is change the Page Status from Verified to Needs Reviewed once the date has passed. 

But I'm having a hard time getting the page details to pass to the task branch. Any ideas on how I can accomplish this? 

 

task.png

Mark B Wager
Contributor
March 10, 2025

Hi Mike

I'm not sure what you're trying to pass in the email. The details of the page are somewhat limited, but you should be able to conditionally act on and pass certain page info.

As a very simple example, you can email the page's Status.

Screenshot 2025-03-10 at 9.54.27 AM.png

I haven't tried this exhaustively in a "Branch", but even in a branch you should be able to access several page details using smart values.

 

Screenshot 2025-03-10 at 10.00.57 AM.png

Like Mike C_ likes this
Mike C_ March 10, 2025

Hi @Mark B Wager maybe I wasn't clear in my original note.  I'm trying to CHANGE the PAGE STATUS from Verified to Needs Reviewed. So if the task date is in the past > change page status to needs reviewed > send email 

 

But the page status action is NOT compatible with the task branch. Not sure how it can return the page url for the email but I cant run this action?

 

Trying to see if there is a way to:

1. go through all pages and find the task that is past due

2. change the page status from Verified to Needs Reviewed

3. Email the user the details. 

 

But if you see below I'm unable to modify this: 

page-status.png

Shawn Doyle - ReleaseTEAM
Community Champion
March 10, 2025

Probably better to start a new thread for this as it's different enough from this original question.

Mike C_ March 10, 2025

@Shawn Doyle - ReleaseTEAM 

I have created a new thread here:

Change Page Status when using Tasks Branch

 

Any input or advice is much appreciated. 

Suggest an answer

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

Atlassian Community Events