Forums

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

Confluence Automation to check page for specific text

Michael 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

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 Leaders.
April 8, 2025

Hi @Michael 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

Suggest an answer

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

Atlassian Community Events