Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,787
Community Members
 
Community Events
184
Community Groups

Use automation to check page last udpate

Jiecai_Peng
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 23, 2023

Hi Community,

I am trying to create an automation rule that checks whether a Confluence page has been updated within the last hour. I attempted to use a schedule trigger with CQL, but discovered that the schedule trigger in Confluence automation does not support queries.

Is there another way to accomplish this task using Confluence automation?

 

Appreciate your help

3 answers

1 accepted

0 votes
Answer accepted
Trev Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 03, 2023

Hi @Jiecai_Peng Trevor here from the Confluence automation team. Here is a working example of an automation rule that logs the titles of pages edited within the last hour:

Screenshot 2023-04-03 at 11.44.00 AM.png

 

If you want to access info about the page through smart values, the 'related entities' branch outputs the {{cqlResult}} smart value, which supports these fields:

  • {{cqlResult.title}}
  • {{cqlResult.type}}
  • {{cqlResult.status}}
  • {{cqlResult.id}}

If you need to access other smart value fields, we may be able to find a workaround. Just let me know!

 

Also, if your use case allows it, I would recommend you run the rule less frequently than every hour. If there is any delay in the rule executing, then it is possible for some piece of content that was updated exactly 60 minutes ago to slip through the cracks. For example, you could do the same rule but have it run every day and update the CQL like so: type = page AND lastmodified > now("-1d")

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 24, 2023 • edited

@Jiecai_Peng We have built an app that supports custom notifications in a super-flexible way.

You can define a flexible schedule, a CQL query, customize the email template and choose the recipients like this:

Confluence (13).png

The CQL query in your case would be:

updated > now("-1h")

Would this meet your requirements?

0 votes
Riley Venable (Atlas Bench)
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 23, 2023
Yes, there is another way to accomplish this task using Confluence automation. You can use the "Page updated" trigger and add an action to check if the page has been updated within the last hour. You can do this by adding a "Branch" action and setting a condition that checks if the page was updated within the last hour using the "Page updated date" variable and the "Current time" variable. If the condition is true, you can add an action to perform the desired task.
James Totah
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 27, 2023

Have you had success with this Automation @Riley Venable (Atlas Bench) I believe Im getting the same error. 

CQL condition
Error in execution:
No CQL-compatible content found in the rule context; there is nothing to check against the CQL query. The CQL condition component can only follow components that involve CQL-compatible content, such as the blogpost published trigger, the publish new page action, or the related entities branch.

 

Screenshot 2023-03-27 at 10.26.35 AM.png

Trev Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 03, 2023

Hi @James Totah I believe that rule will work if you replace the 'CQL condition' component with a 'Branch rule / related entities' component (and use the same CQL query).

The 'CQL condition' is a filter, it is used to stop or continue the rule execution based on the properties of the CQL content that last appeared in the rule. In the case of a scheduled trigger, there is no particular content to check against the CQL query.

The 'related entities' branch is more like a search mechanism, it allows you to find any piece of content you want based on the CQL query. In this case it looks like that is what you're looking for.

Like James Totah likes this
James Totah
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 03, 2023

It worked! Thank you!

Suggest an answer

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

Atlassian Community Events