Alert/Report on Key Word Usage
Asked by Christy Draicchio:

I would like to create a report that alerts on the use of keywords on new/edited confluence pages. Is this possible?


Answers:
author: Yuri Makaruk
body: I would also like to know if this works in Atlassian cloud confluence workspaces, or only on the atlassian community?


author: Darryl Lee
body: Sorry for the late reply here, but I was looking for an answer to the same question, and have to point out [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600) 's answer is unfortunately incorrect, as [@Christy Draicchio](/t5/user/viewprofilepage/user-id/4039198) was asking for alerts about "the use of keywords on new/edited **confluence** pages".

The instructions and screenshots Dominic provided are, as [@Emile Delcourt](/t5/user/viewprofilepage/user-id/4741758) correctly points out, from this very **Atlassian Community** site (<https://community.atlassian.com/>) which runs on Khoros, *not* Confluence.

In looking for a solution, we're considering writing an external script (in our case using Microsoft's Power Automate) to hit the Confluence API on a daily basis, searching for any page created or edited in the last 24 hours that contain a particular keyword, and if so, sending an email with the list of pages.

**++If you want to do something similar:++**

You'll want to refer to the search API for Confluence Cloud here: <https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-wiki-rest-api-search-get>

You might just use something simple like: **text \~ "KEYWORD"** but you definitely will want the date constraint, like the one I used: **created =\> now("-1d")**.

Another option is **lastModified =\> now("-1d")**, and you can combine them, so:

**(lastModified \>= now("-1d") OR created \>= now("-1d")) AND text \~ "KEYWORD"**

This needs to be run through a [URL encoder](https://www.urlencoder.org/) and you end up with something like this:

[https://MYSITE.atlassian.net/wiki/rest/api/search?cql=%28lastModified%20%3E%3D%20now%28%22-1d%22%29%20OR%20created%20%3E%3D%20now%28%22-1d%22%29%29%20AND%20text%20\~%20%22KEYWORD%22](https://MYSITE.atlassian.net/wiki/rest/api/search?cql=%28lastModified%20%3E%3D%20now%28%22-1d%22%29%20OR%20created%20%3E%3D%20now%28%22-1d%22%29%29%20AND%20text%20~%20%22KEYWORD%22)

This returns JSON, which needs to be parsed, and you need logic to only send an email if there are more than zero results, etc. My colleague is working on that part of it in Power Automate ([example](https://techcommunity.microsoft.com/t5/microsoft-365-pnp-blog/how-to-use-parse-json-action-in-power-automate/ba-p/2121861)).

If this sounds complicated... it kind of is. You could also make it even more complicated (or not, depending on what kind of engineers you have handy) and do it in Python.

OR, maybe Atlassian could release [Automation for Confluence](https://support.atlassian.com/confluence-cloud/docs/use-automation-for-confluence-premium-feature/) finally. Or maybe they have. I'm not on Premium. :-{

comments: author: Dominic Lagger
body: Hi [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322)

Thanks for sharing!

Please read carefully the whole post. Because: my first anwer is "no, you can't out of the box, but probably with another tool". literally the same answer you gave.

My second answer was for [@Titus](/t5/user/viewprofilepage/user-id/518692) only, who asked about the possibility in this community board, which I answered also correctly ;)

Regards, Dominic


author: Dominic Lagger
body: Hi [@Christy Draicchio](/t5/user/viewprofilepage/user-id/4039198)

This is not possible out of the box.

The only thing I could possibly imagine is an app called [ScriptRunner for Confluence](https://marketplace.atlassian.com/apps/1215215/scriptrunner-for-confluence?hosting=cloud&tab=overview).

With this you probably could create a new EventListener on "PageSave" and search for some keywords and if result = true, then send an email.

For this, you need programming skills and again, I'm not 100% sure, whether this works on cloud or not :)

Regards, Dominic

comments: author: Titus
body: Hi Dominic,

is there a way to define keywords to be informed about new posts in this community board?

This would be useful for the company I am working for. So we will be informed if a user asks a question about one of our Atlassian addons and can provide an answer as soon as possible.

Regards, Titus

Software Engineer,

SecSign Technologies Inc.


author: Dominic Lagger
body: Hi [@Titus](/t5/user/viewprofilepage/user-id/518692)

Go to your profile settings --\> Notifications --\> Search alerts and create the keywords.

Regards, Dominic

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


author: Titus
body: Hi Dominic,

thank you! This is exactly I was looking for.

Regards

Titus


author: Emile Delcourt
body: Can this work in atlassian cloud confluence workspaces, or only on the atlassian community?


Tags: cloud

confluence-cloud