Automation Rule for Incomplete Action Items/Task in Confluence - Include link to page?
Asked by Bell Lopez:

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?


Answers:
author: Mark B Wager
body: Hi [@Bell Lopez](/t5/user/viewprofilepage/user-id/1346973)

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](https://community.atlassian.com/t5/image/serverpage/image-id/313420i0026457A414E9668/image-dimensions/328x334?v=v2 "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](https://community.atlassian.com/t5/image/serverpage/image-id/313418i1597BA2BCB6A6BE9/image-dimensions/257x291?v=v2 "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

comments: author: Max_Clark
body: Just want to say this is awesome!


author: Shawn Doyle - ReleaseTEAM
body: Have you tried something like this?

![automation_rule2.png](https://community.atlassian.com/t5/image/serverpage/image-id/311427i11A2B7BAB82D32AC/image-size/large?v=v2&px=999 "automation_rule2.png")

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

comments: author: Mark B Wager
body: 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


Tags: automation

cloud

confluence-cloud