Forums

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

Sending 1 Email to Page Authors Based on Last Updated Date

shaily_mehta April 8, 2025

I am having errors related to the smart value in step 5. Would like to know if this is the correct method or there are any other options for me to send 1 email to the page owner/author to review page whicha are older than 6 months. ALso would like to makr them as reviewed once it has been updated or reviewd.

Thanks in advance.

 

 

  1. Trigger: Set the trigger to run the automation on a scheduled basis (e.g., every week).
  2. Action: Lookup Pages: Look for pages that haven’t been updated in the last 6 months.
  3. Create Variable: Create a variable uniqueAuthors to list the distinct authors (email addresses) of the pages found.
    • Smart Value: {{lookupPages.distinct("author.emailAddress")}}
  4. Loop for Each Author: Loop through each author using the For Each action.
    • Smart Value: {{uniqueAuthors}}
  5. Create Variable (for each author): Create a variable authorPages to list the pages by the current author.
    • Smart Value: 
    • {{#lookupPages}} {{#if(equals(author.emailAddress, authorEmail))}} * {{page.title}} at {{page.url}} (Last updated: {{page.dateLastUpdated.shortDate}}) {{/if}} {{/lookupPages}}
  6. Send Email: Send an email to the respective author with the list of pages they authored.
    • Email Setup: To: {{authorEmail}}
    • Subject: Inactive Pages Notification
    • Body: liquid Copy Edit Hi, You are listed as the author of these pages that haven't been updated in the last 6 months: {{authorPages}} Please review and update them.

2 answers

1 accepted

2 votes
Answer accepted
Barbara Szczesniak
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.
April 9, 2025

@shaily_mehta Welcome to the Atlassian Community.

I don't use automation myself, so I'm not sure if what you have done is based on this article, but I wanted to give you the link in case you haven't seen this: https://community.atlassian.com/forums/Confluence-articles/New-batch-notifications-and-look-up-capabilities-%EF%B8%8F/ba-p/2757589  

1 vote
Bill Sheboy
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.
April 9, 2025

Hi @shaily_mehta -- Welcome to the Atlassian Community!

Short answer: as written, the rule you describe cannot work as you intend.  There is a template rule you could try instead.

From the rule list, select Templates and under the Notify section, select this rule and update the timeframe in the branch to meet your needs:

Notify people about inactive pages when scheduled (recurring)

 

If you still want to use your rule as you described it, context is important for the community to help.  Please post the following:

  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution
  • explain what is not working as expected and why you believe that to be the case

Until we see those...

The syntax you use in step #3 to find and create the variable for uniqueAuthors is incorrect.  Please try this syntax to use the distinct function:

{{lookupPages.author.emailAddress.distinct}}

 

Next, once that variable has been created, it produces a delimited list of email address values.  That must be split() apart to be used in the advanced branch in step #4:

{{uniqueAuthors.split(", ")}}

 

Next, in step #5 there are several problems, and the most important one is:

Once inside of an iterator such as over {{lookupPages}}, other data is not visible.  Thus the variable authorEmail cannot be "seen" to perform the list filtering.  Unfortunately, the Lookup Pages action does not support smart values for comparison of the author to the branch variable.

I believe the only workaround for your scenario would be to use CQL can call the REST API endpoint to get the pages using the Send Web Request action.  If you want to try that, here are some references to help:

 

Kind regards,
Bill

shaily_mehta April 9, 2025

Thank Bill for your detailed response. I will try the REST API call today.

Here is the image for your reference.

ConfluenceRule.png

Bill Sheboy
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.
April 9, 2025

Please take a look at the template rule first as that may do everything you need.  Thanks!

shaily_mehta April 9, 2025

Yes Bill that works well. Thanks for your help!!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events