The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Confluence Automation to check page for specific text

Ian MacDonald
Contributor
April 8, 2025

Hello,

I am looking to setup an automation that will run on page edit that looks for a specific text string. If this string is not present on the page, I want to send an email.

Is this currently possible? I included a picture of my very simple automation below. Currently this automation always returns true, regardless of if the text is present on the page or not. Thank youScreenshot 2025-04-08 124646.png

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
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 Champions.
April 8, 2025

Hi @Ian MacDonald 

Are you trying to exactly match on the phrase "Document Header Info"?

 

Your CQL expression uses the CONTAINS ~ operator to search for that text, and I hypothesize those three words are on each page you are checking.  I recommend pausing to verify that.

And, the documentation for the CQL CONTAINS operator states it supports the "exact phrase" syntax like JQL:

text ~ "\"Document Header Info\""

But, there is an open defect indicating that does not work due to encoding problems: https://jira.atlassian.com/browse/CONFCLOUD-71411

 

One possible workaround for this is to get the page content using the REST API and the Send Web Request action, and then use a rule condition on the web response.  That will allow performing the exact phrase matching.

 

Kind regards,
Bill

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events